diff options
| author | bors <bors@rust-lang.org> | 2014-11-21 11:36:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-21 11:36:45 +0000 |
| commit | 47c1d437c93872e6776570beac839f2587782f94 (patch) | |
| tree | 7fe6323cf7e94a6d82e3545bb21740467ee0b756 | |
| parent | e583c4d24be2d68d4a0d940fe8639537103b537e (diff) | |
| parent | f3a33ab4e8ced830250fbc9715decf419ad394fc (diff) | |
| download | rust-47c1d437c93872e6776570beac839f2587782f94.tar.gz rust-47c1d437c93872e6776570beac839f2587782f94.zip | |
auto merge of #18984 : sheroze1123/rust/fix17574, r=bstrie
Fix #17574
| -rw-r--r-- | src/librustc/middle/typeck/check/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc/middle/typeck/check/mod.rs b/src/librustc/middle/typeck/check/mod.rs index 70235a7c2fd..85d2f573615 100644 --- a/src/librustc/middle/typeck/check/mod.rs +++ b/src/librustc/middle/typeck/check/mod.rs @@ -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() |
