Fix for issue #17574
This commit is contained in:
parent
7e43f419cb
commit
4aab27bed6
1 changed files with 1 additions and 1 deletions
|
|
@ -2534,7 +2534,7 @@ fn lookup_method_for_for_loop(fcx: &FnCtxt,
|
|||
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…
Add table
Add a link
Reference in a new issue