]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | struct Foo { |
2 | x: isize, | |
3 | } | |
4 | ||
5 | impl Foo { | |
6 | fn hi(&self) -> bool { | |
223e47cc LB |
7 | true |
8 | } | |
9 | } | |
1a4d82fc JJ |
10 | |
11 | fn main() { | |
48663c56 XL |
12 | if Foo { //~ ERROR struct literals are not allowed here |
13 | x: 3 | |
14 | }.hi() { | |
1a4d82fc JJ |
15 | println!("yo"); |
16 | } | |
781aab86 FG |
17 | if let true = Foo { //~ ERROR struct literals are not allowed here |
18 | x: 3 | |
19 | }.hi() { | |
20 | println!("yo"); | |
21 | } | |
1a4d82fc | 22 | } |