]> git.lizzy.rs Git - rust.git/blob - tests/ui/parser/bare-struct-body.stderr
Rollup merge of #106638 - RalfJung:realstd, r=thomcc
[rust.git] / tests / ui / parser / bare-struct-body.stderr
1 error: struct literal body without path
2   --> $DIR/bare-struct-body.rs:5:17
3    |
4 LL |   fn foo() -> Foo {
5    |  _________________^
6 LL | |     val: (),
7 LL | | }
8    | |_^
9    |
10 help: you might have forgotten to add the struct literal inside the block
11    |
12 LL ~ fn foo() -> Foo { SomeStruct {
13 LL |     val: (),
14 LL ~ } }
15    |
16
17 error: struct literal body without path
18   --> $DIR/bare-struct-body.rs:12:13
19    |
20 LL |       let x = {
21    |  _____________^
22 LL | |         val: (),
23 LL | |     };
24    | |_____^
25    |
26 help: you might have forgotten to add the struct literal inside the block
27    |
28 LL ~     let x = { SomeStruct {
29 LL |         val: (),
30 LL ~     } };
31    |
32
33 error[E0308]: mismatched types
34   --> $DIR/bare-struct-body.rs:11:14
35    |
36 LL |     x.val == 42;
37    |     -----    ^^ expected `()`, found integer
38    |     |
39    |     expected because this is `()`
40
41 error: aborting due to 3 previous errors
42
43 For more information about this error, try `rustc --explain E0308`.