Skip to content

Commit 1ffd092

Browse files
committed
book: import implements_trait from clippy_utils::ty
1 parent 9027625 commit 1ffd092

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

book/src/development/trait_checking.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ For instance, if we want to examine whether an expression `expr` implements
5353
we can check that the `Ty` of the `expr` implements the trait:
5454

5555
```rust
56-
use clippy_utils::implements_trait;
56+
use clippy_utils::ty::implements_trait;
5757
use rustc_hir::Expr;
5858
use rustc_lint::{LateContext, LateLintPass};
5959

@@ -79,7 +79,8 @@ If neither diagnostic item nor a language item is available, we can use
7979
Below, we check if the given `expr` implements [`core::iter::Step`](https://doc.rust-lang.org/std/iter/trait.Step.html):
8080

8181
```rust
82-
use clippy_utils::{implements_trait, paths};
82+
use clippy_utils::paths;
83+
use clippy_utils::ty::implements_trait;
8384
use rustc_hir::Expr;
8485
use rustc_lint::{LateContext, LateLintPass};
8586

0 commit comments

Comments
 (0)