]> git.proxmox.com Git - rustc.git/blame - src/test/ui/parser/struct-literal-restrictions-in-lamda.stderr
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / parser / struct-literal-restrictions-in-lamda.stderr
CommitLineData
48663c56
XL
1error: struct literals are not allowed here
2 --> $DIR/struct-literal-restrictions-in-lamda.rs:12:14
532ac7d7 3 |
48663c56
XL
4LL | while || Foo {
5 | ______________^
6LL | | x: 3
7LL | | }.hi() {
8 | |_____^
e74abb32 9 |
48663c56 10help: surround the struct literal with parentheses
532ac7d7 11 |
48663c56 12LL | while || (Foo {
532ac7d7 13LL | x: 3
48663c56 14LL | }).hi() {
0bf4aa26 15 |
0bf4aa26 16
48663c56
XL
17error[E0308]: mismatched types
18 --> $DIR/struct-literal-restrictions-in-lamda.rs:12:11
0731742a 19 |
48663c56
XL
20LL | while || Foo {
21 | ___________^
22LL | | x: 3
23LL | | }.hi() {
60c5eb7d 24 | |__________^ expected `bool`, found closure
0731742a 25 |
48663c56 26 = note: expected type `bool`
60c5eb7d 27 found closure `[closure@$DIR/struct-literal-restrictions-in-lamda.rs:12:11: 14:11]`
0731742a 28
48663c56 29error: aborting due to 2 previous errors
0bf4aa26 30
48663c56 31For more information about this error, try `rustc --explain E0308`.