]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-unit-expr.stderr
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[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:15:14
3    |
4 LL | struct Empty2;
5    | -------------- `Empty2` defined here
6 ...
7 LL |     let e2 = Empty2();
8    |              ^^^^^^--
9    |              |
10    |              call expression requires function
11
12 error[E0618]: expected function, found enum variant `E::Empty4`
13   --> $DIR/empty-struct-unit-expr.rs:16:14
14    |
15 LL |     Empty4
16    |     ------ `E::Empty4` defined here
17 ...
18 LL |     let e4 = E::Empty4();
19    |              ^^^^^^^^^--
20    |              |
21    |              call expression requires function
22    |
23 help: `E::Empty4` is a unit variant, you need to write it without the parentheses
24    |
25 LL -     let e4 = E::Empty4();
26 LL +     let e4 = E::Empty4;
27    | 
28
29 error[E0618]: expected function, found `empty_struct::XEmpty2`
30   --> $DIR/empty-struct-unit-expr.rs:18:15
31    |
32 LL |     let xe2 = XEmpty2();
33    |               ^^^^^^^--
34    |               |
35    |               call expression requires function
36
37 error[E0618]: expected function, found enum variant `XE::XEmpty4`
38   --> $DIR/empty-struct-unit-expr.rs:19:15
39    |
40 LL |     let xe4 = XE::XEmpty4();
41    |               ^^^^^^^^^^^--
42    |               |
43    |               call expression requires function
44    |
45 help: `XE::XEmpty4` is a unit variant, you need to write it without the parentheses
46    |
47 LL -     let xe4 = XE::XEmpty4();
48 LL +     let xe4 = XE::XEmpty4;
49    | 
50
51 error: aborting due to 4 previous errors
52
53 For more information about this error, try `rustc --explain E0618`.