]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/struct-literal-restrictions-in-lamda.rs
Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into sync_cg_clif-2023-01-24
[rust.git] / tests / ui / parser / struct-literal-restrictions-in-lamda.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     while || Foo { //~ ERROR struct literals are not allowed here
13         x: 3       //~^ ERROR mismatched types
14     }.hi() {
15         println!("yo");
16     }
17 }