]> git.lizzy.rs Git - rust.git/blob - src/test/ui/for/for-loop-bogosity.rs
Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
[rust.git] / src / test / ui / for / for-loop-bogosity.rs
1 struct MyStruct {
2     x: isize,
3     y: isize,
4 }
5
6 impl MyStruct {
7     fn next(&mut self) -> Option<isize> {
8         Some(self.x)
9     }
10 }
11
12 pub fn main() {
13     let mut bogus = MyStruct {
14         x: 1,
15         y: 2,
16     };
17     for x in bogus {
18     //~^ ERROR `MyStruct` is not an iterator
19         drop(x);
20     }
21 }