fork/rust

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

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

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