mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-30 16:43:41 +00:00
commit
47c1d437c9
@ -2643,7 +2643,8 @@ fn lookup_method_for_for_loop<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
|
||||
let ty_string = fcx.infcx().ty_to_string(true_expr_type);
|
||||
fcx.tcx().sess.span_err(iterator_expr.span,
|
||||
format!("`for` loop expression has type `{}` which does \
|
||||
not implement the `Iterator` trait",
|
||||
not implement the `Iterator` trait; \
|
||||
maybe try .iter()",
|
||||
ty_string).as_slice());
|
||||
}
|
||||
ty::mk_err()
|
||||
|
Loading…
Reference in New Issue
Block a user