about summary refs log tree commit diff
path: root/src/test/compile-fail/for-loop-bogosity.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-30/+0
2016-04-05improve the printing of substs and trait-refsAriel Ben-Yehuda-1/+1
2016-04-05suggest adding a where-clause when that can helpAriel Ben-Yehuda-1/+1
suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it.
2016-03-30Fix fallout in testsJeffrey Seyfried-1/+1
2015-09-26deduplicate trait errors before they are displayedAriel Ben-Yehuda-3/+0
Because of type inference, duplicate obligations exist and cause duplicate errors. To avoid this, only display the first error for each (predicate,span). The inclusion of the span is somewhat bikesheddy, but *is* the more conservative option (it does not remove some instability, as duplicate obligations are ignored by `duplicate_set` under some inference conditions). Fixes #28098 cc #21528 (is it a dupe?)
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]