]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-unit-expr.stderr
Auto merge of #81507 - weiznich:add_diesel_to_cargo_test, r=Mark-Simulacrum
[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 parenthesis
24    |
25 LL |     let e4 = E::Empty4;
26    |              ^^^^^^^^^
27
28 error[E0618]: expected function, found `empty_struct::XEmpty2`
29   --> $DIR/empty-struct-unit-expr.rs:18:15
30    |
31 LL |     let xe2 = XEmpty2();
32    |               ^^^^^^^--
33    |               |
34    |               call expression requires function
35
36 error[E0618]: expected function, found enum variant `XE::XEmpty4`
37   --> $DIR/empty-struct-unit-expr.rs:19:15
38    |
39 LL |     let xe4 = XE::XEmpty4();
40    |               ^^^^^^^^^^^--
41    |               |
42    |               call expression requires function
43    |
44 help: `XE::XEmpty4` is a unit variant, you need to write it without the parenthesis
45    |
46 LL |     let xe4 = XE::XEmpty4;
47    |               ^^^^^^^^^^^
48
49 error: aborting due to 4 previous errors
50
51 For more information about this error, try `rustc --explain E0618`.