]> git.lizzy.rs Git - rust.git/blob - tests/ui/empty/empty-struct-unit-expr.stderr
Auto merge of #105582 - saethlin:instcombine-assert-inhabited, r=cjgillot
[rust.git] / tests / ui / empty / empty-struct-unit-expr.stderr
1 error[E0618]: expected function, found struct `Empty2`
2   --> $DIR/empty-struct-unit-expr.rs:15:14
3    |
4 LL | struct Empty2;
5    | ------------- struct `Empty2` defined here
6 ...
7 LL |     let e2 = Empty2();
8    |              ^^^^^^--
9    |              |
10    |              call expression requires function
11    |
12 help: `Empty2` is a unit struct, and does not take parentheses to be constructed
13    |
14 LL -     let e2 = Empty2();
15 LL +     let e2 = Empty2;
16    |
17
18 error[E0618]: expected function, found enum variant `E::Empty4`
19   --> $DIR/empty-struct-unit-expr.rs:16:14
20    |
21 LL |     Empty4
22    |     ------ enum variant `E::Empty4` defined here
23 ...
24 LL |     let e4 = E::Empty4();
25    |              ^^^^^^^^^--
26    |              |
27    |              call expression requires function
28    |
29 help: `E::Empty4` is a unit enum variant, and does not take parentheses to be constructed
30    |
31 LL -     let e4 = E::Empty4();
32 LL +     let e4 = E::Empty4;
33    |
34
35 error[E0618]: expected function, found struct `XEmpty2`
36   --> $DIR/empty-struct-unit-expr.rs:18:15
37    |
38 LL |     let xe2 = XEmpty2();
39    |               ^^^^^^^--
40    |               |
41    |               call expression requires function
42    |
43 help: `XEmpty2` is a unit struct, and does not take parentheses to be constructed
44    |
45 LL -     let xe2 = XEmpty2();
46 LL +     let xe2 = XEmpty2;
47    |
48
49 error[E0618]: expected function, found enum variant `XE::XEmpty4`
50   --> $DIR/empty-struct-unit-expr.rs:19:15
51    |
52 LL |     let xe4 = XE::XEmpty4();
53    |               ^^^^^^^^^^^--
54    |               |
55    |               call expression requires function
56    |
57 help: `XE::XEmpty4` is a unit enum variant, and does not take parentheses to be constructed
58    |
59 LL -     let xe4 = XE::XEmpty4();
60 LL +     let xe4 = XE::XEmpty4;
61    |
62
63 error: aborting due to 4 previous errors
64
65 For more information about this error, try `rustc --explain E0618`.