Fix imports for "Checking if a type defines a specific method"

The import of `clippy_utils::is_type_diagnostic_item` would cause this
error:

```
error[E0432]: unresolved import `clippy_utils::is_type_diagnostic_item
```
This commit is contained in:
Dany Marcoux 2022-05-24 14:53:08 +02:00
parent b6ad6fc5aa
commit 21d949381c
No known key found for this signature in database
GPG key ID: 2E558BC282FA5A4A

View file

@ -159,7 +159,8 @@ A list of defined paths for Clippy can be found in [paths.rs][paths]
To check if our type defines a method called `some_method`: To check if our type defines a method called `some_method`:
```rust ```rust
use clippy_utils::{is_type_diagnostic_item, return_ty}; use clippy_utils::ty::is_type_diagnostic_item;
use clippy_utils::return_ty;
impl<'tcx> LateLintPass<'tcx> for MyTypeImpl { impl<'tcx> LateLintPass<'tcx> for MyTypeImpl {
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) {