Skip to content

Commit 21d9493

Browse files
author
Dany Marcoux
committed
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 ```
1 parent b6ad6fc commit 21d9493

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/common_tools_writing_lints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ A list of defined paths for Clippy can be found in [paths.rs][paths]
159159
To check if our type defines a method called `some_method`:
160160

161161
```rust
162-
use clippy_utils::{is_type_diagnostic_item, return_ty};
162+
use clippy_utils::ty::is_type_diagnostic_item;
163+
use clippy_utils::return_ty;
163164

164165
impl<'tcx> LateLintPass<'tcx> for MyTypeImpl {
165166
fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) {

0 commit comments

Comments
 (0)