about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKazuki Obata <koiru3822fs@gmail.com>2025-05-28 23:37:31 +0900
committerGitHub <noreply@github.com>2025-05-28 23:37:31 +0900
commit402fc8105b418b9d8c6b4effe6f092e08fe70fb4 (patch)
tree7cd597287cebd16d31c073f46153ed91278bcaab
parent551870df96213c423c94a012c1981fc0cdc06fc2 (diff)
downloadrust-402fc8105b418b9d8c6b4effe6f092e08fe70fb4.tar.gz
rust-402fc8105b418b9d8c6b4effe6f092e08fe70fb4.zip
Update trait_checking.md
-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 cc4eb966f59..4349c000a76 100644
--- a/book/src/development/trait_checking.md
+++ b/book/src/development/trait_checking.md
@@ -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 {
 			// [...]