summary refs log tree commit diff
path: root/src/test/compile-fail/for-loop-bogosity.rs
AgeCommit message (Collapse)AuthorLines
2015-01-30fix testsJorge Aparicio-1/+4
2015-01-08Update compile fail tests to use isize.Huon Wilson-3/+3
2014-08-29Mention type of `for` exprs that don't implement Iterator.Huon Wilson-2/+1
This improves the error message by telling the user the exact type of `x` if it doesn't implement `Iterator` in `for ... in x {}`. Closes #16043.
2014-07-24librustc: Stop desugaring `for` expressions and translate them directly.Patrick Walton-0/+31
This makes edge cases in which the `Iterator` trait was not in scope and/or `Option` or its variants were not in scope work properly. This breaks code that looks like: struct MyStruct { ... } impl MyStruct { fn next(&mut self) -> Option<int> { ... } } for x in MyStruct { ... } { ... } Change ad-hoc `next` methods like the above to implementations of the `Iterator` trait. For example: impl Iterator<int> for MyStruct { fn next(&mut self) -> Option<int> { ... } } Closes #15392. [breaking-change]