We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e43f41 commit 4aab27bCopy full SHA for 4aab27b
src/librustc/middle/typeck/check/mod.rs
@@ -2534,7 +2534,7 @@ fn lookup_method_for_for_loop(fcx: &FnCtxt,
2534
let ty_string = fcx.infcx().ty_to_string(true_expr_type);
2535
fcx.tcx().sess.span_err(iterator_expr.span,
2536
format!("`for` loop expression has type `{}` which does \
2537
- not implement the `Iterator` trait",
+ not implement the `Iterator` trait: maybe try .iter()",
2538
ty_string).as_slice());
2539
}
2540
ty::mk_err()
0 commit comments