Skip to content

Commit 47c1d43

Browse files
committed
auto merge of #18984 : sheroze1123/rust/fix17574, r=bstrie
Fix #17574
2 parents e583c4d + f3a33ab commit 47c1d43

File tree

1 file changed

+2
-1
lines changed
  • src/librustc/middle/typeck/check

1 file changed

+2
-1
lines changed

src/librustc/middle/typeck/check/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2643,7 +2643,8 @@ fn lookup_method_for_for_loop<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
26432643
let ty_string = fcx.infcx().ty_to_string(true_expr_type);
26442644
fcx.tcx().sess.span_err(iterator_expr.span,
26452645
format!("`for` loop expression has type `{}` which does \
2646-
not implement the `Iterator` trait",
2646+
not implement the `Iterator` trait; \
2647+
maybe try .iter()",
26472648
ty_string).as_slice());
26482649
}
26492650
ty::mk_err()

0 commit comments

Comments
 (0)