]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-unit-expr.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / empty / empty-struct-unit-expr.stderr
1 error[E0618]: expected function, found `Empty2`
2   --> $DIR/empty-struct-unit-expr.rs:25:14
3    |
4 LL | struct Empty2;
5    | -------------- `Empty2` defined here
6 ...
7 LL |     let e2 = Empty2(); //~ ERROR expected function, found `Empty2`
8    |              ^^^^^^^^ not a function
9
10 error[E0618]: expected function, found enum variant `E::Empty4`
11   --> $DIR/empty-struct-unit-expr.rs:26:14
12    |
13 LL |     Empty4
14    |     ------ `E::Empty4` defined here
15 ...
16 LL |     let e4 = E::Empty4();
17    |              ^^^^^^^^^^^ not a function
18 help: `E::Empty4` is a unit variant, you need to write it without the parenthesis
19    |
20 LL |     let e4 = E::Empty4;
21    |              ^^^^^^^^^
22
23 error[E0618]: expected function, found `empty_struct::XEmpty2`
24   --> $DIR/empty-struct-unit-expr.rs:28:15
25    |
26 LL |     let xe2 = XEmpty2(); //~ ERROR expected function, found `empty_struct::XEmpty2`
27    |               ^^^^^^^^^ not a function
28
29 error[E0618]: expected function, found enum variant `XE::XEmpty4`
30   --> $DIR/empty-struct-unit-expr.rs:29:15
31    |
32 LL |     let xe4 = XE::XEmpty4();
33    |               ^^^^^^^^^^^^^ not a function
34 help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis
35    |
36 LL |     let xe4 = XE::XEmpty4;
37    |               ^^^^^^^^^^^
38
39 error: aborting due to 4 previous errors
40
41 For more information about this error, try `rustc --explain E0618`.