We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 551870d commit 402fc81Copy full SHA for 402fc81
book/src/development/trait_checking.md
@@ -25,7 +25,7 @@ use rustc_span::symbol::sym;
25
impl LateLintPass<'_> for CheckIteratorTraitLint {
26
fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) {
27
let implements_iterator = cx.tcx.get_diagnostic_item(sym::Iterator).map_or(false, |id| {
28
- implements_trait(cx, cx.typeck_results().expr_ty(arg), id, &[])
+ implements_trait(cx, cx.typeck_results().expr_ty(expr), id, &[])
29
});
30
if implements_iterator {
31
// [...]
0 commit comments