about summary refs log tree commit diff
path: root/book/src/development
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2025-05-31 14:09:03 +0200
committerPhilipp Krones <hello@philkrones.com>2025-05-31 14:09:03 +0200
commit384b53eee2a479969347bbe3a46c504353cc00a2 (patch)
treef11d7e335b46a53087a622c8360b5b842ef59e20 /book/src/development
parent660aede53066ca0ab4354160d982d19b7962739b (diff)
parent2948678647a298047a42c72d7060bf509d74bd1d (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'book/src/development')
-rw-r--r--book/src/development/trait_checking.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/book/src/development/trait_checking.md b/book/src/development/trait_checking.md
index cc4eb966f59..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;
@@ -25,7 +25,7 @@ use rustc_span::symbol::sym;
 impl LateLintPass<'_> for CheckIteratorTraitLint {
     fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) {
 		let implements_iterator = cx.tcx.get_diagnostic_item(sym::Iterator).map_or(false, |id| {
-    		implements_trait(cx, cx.typeck_results().expr_ty(arg), id, &[])
+    		implements_trait(cx, cx.typeck_results().expr_ty(expr), id, &[])
 		});
 		if implements_iterator {
 			// [...]