about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2025-05-30 08:28:04 +0000
committerGitHub <noreply@github.com>2025-05-30 08:28:04 +0000
commitaf5b6e8c8e5d5fc86eacb726886d98e1712d60ed (patch)
tree7025c9583fb363c54a36584675423be1033f47f2
parent1822006b115f77b0b35c3f263080d91b52e6a056 (diff)
parentaa667f431710f1af461b3f3c263811ceaac603a7 (diff)
downloadrust-af5b6e8c8e5d5fc86eacb726886d98e1712d60ed.tar.gz
rust-af5b6e8c8e5d5fc86eacb726886d98e1712d60ed.zip
docs(trait_checking): import the right function (#14891)
`is_trait_method` is not even used in this codeblock, whereas
`implements_trait` is used but not imported

(not sure if this is _actually_ a "changelog: none", since the
documentation is at least contributor-facing)

changelog: none
-rw-r--r--book/src/development/trait_checking.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/book/src/development/trait_checking.md b/book/src/development/trait_checking.md
index 4349c000a76..6d01496eebe 100644
--- a/book/src/development/trait_checking.md
+++ b/book/src/development/trait_checking.md
@@ -17,7 +17,7 @@ providing the `LateContext` (`cx`), our expression at hand, and
 the symbol of the trait in question:
 
 ```rust
-use clippy_utils::is_trait_method;
+use clippy_utils::ty::implements_trait;
 use rustc_hir::Expr;
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_span::symbol::sym;