auto merge of #18984 : sheroze1123/rust/fix17574, r=bstrie

Fix #17574
This commit is contained in:
bors 2014-11-21 11:36:45 +00:00
commit 47c1d437c9

View File

@ -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()