]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/struct-literal-in-for.rs
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020...
[rust.git] / src / test / ui / parser / struct-literal-in-for.rs
1 struct Foo {
2     x: isize,
3 }
4
5 impl Foo {
6     fn hi(&self) -> bool {
7         true
8     }
9 }
10
11 fn main() {
12     for x in Foo { //~ ERROR struct literals are not allowed here
13         x: 3       //~^ ERROR `bool` is not an iterator
14     }.hi() {
15         println!("yo");
16     }
17 }