fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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