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.
2 parents a31d3b0 + 402fc81 commit 291b8fdCopy full SHA for 291b8fd
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