]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-struct-braces-expr.stderr
Merge commit '8da837185714cefbb261e93e9846afb11c1dc60e' into sync-rustfmt-subtree
[rust.git] / src / test / ui / empty / empty-struct-braces-expr.stderr
1 error[E0423]: expected value, found struct `Empty1`
2   --> $DIR/empty-struct-braces-expr.rs:15:14
3    |
4 LL | struct Empty1 {}
5    | ---------------- `Empty1` defined here
6 ...
7 LL |     let e1 = Empty1;
8    |              ^^^^^^
9    |
10   ::: $DIR/auxiliary/empty-struct.rs:2:1
11    |
12 LL | pub struct XEmpty2;
13    | ------------------- similarly named unit struct `XEmpty2` defined here
14    |
15 help: use struct literal syntax instead
16    |
17 LL |     let e1 = Empty1 {};
18    |              ~~~~~~~~~
19 help: a unit struct with a similar name exists
20    |
21 LL |     let e1 = XEmpty2;
22    |              ~~~~~~~
23
24 error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1`
25   --> $DIR/empty-struct-braces-expr.rs:16:14
26    |
27 LL | struct Empty1 {}
28    | ---------------- `Empty1` defined here
29 ...
30 LL |     let e1 = Empty1();
31    |              ^^^^^^^^
32    |
33   ::: $DIR/auxiliary/empty-struct.rs:2:1
34    |
35 LL | pub struct XEmpty2;
36    | ------------------- similarly named unit struct `XEmpty2` defined here
37    |
38 help: use struct literal syntax instead
39    |
40 LL |     let e1 = Empty1 {};
41    |              ~~~~~~~~~
42 help: a unit struct with a similar name exists
43    |
44 LL |     let e1 = XEmpty2();
45    |              ~~~~~~~
46
47 error[E0423]: expected value, found struct variant `E::Empty3`
48   --> $DIR/empty-struct-braces-expr.rs:18:14
49    |
50 LL |     Empty3 {}
51    |     --------- `E::Empty3` defined here
52 ...
53 LL |     let e3 = E::Empty3;
54    |              ^^^^^^^^^ help: use struct literal syntax instead: `E::Empty3 {}`
55
56 error[E0423]: expected function, tuple struct or tuple variant, found struct variant `E::Empty3`
57   --> $DIR/empty-struct-braces-expr.rs:19:14
58    |
59 LL |     Empty3 {}
60    |     --------- `E::Empty3` defined here
61 ...
62 LL |     let e3 = E::Empty3();
63    |              ^^^^^^^^^^^ help: use struct literal syntax instead: `E::Empty3 {}`
64
65 error[E0423]: expected value, found struct `XEmpty1`
66   --> $DIR/empty-struct-braces-expr.rs:22:15
67    |
68 LL |     let xe1 = XEmpty1;
69    |               ^^^^^^^
70    |
71   ::: $DIR/auxiliary/empty-struct.rs:1:1
72    |
73 LL | pub struct XEmpty1 {}
74    | ------------------ `XEmpty1` defined here
75 LL | pub struct XEmpty2;
76    | ------------------- similarly named unit struct `XEmpty2` defined here
77    |
78 help: use struct literal syntax instead
79    |
80 LL |     let xe1 = XEmpty1 {};
81    |               ~~~~~~~~~~
82 help: a unit struct with a similar name exists
83    |
84 LL |     let xe1 = XEmpty2;
85    |               ~~~~~~~
86
87 error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1`
88   --> $DIR/empty-struct-braces-expr.rs:23:15
89    |
90 LL |     let xe1 = XEmpty1();
91    |               ^^^^^^^^^
92    |
93   ::: $DIR/auxiliary/empty-struct.rs:1:1
94    |
95 LL | pub struct XEmpty1 {}
96    | ------------------ `XEmpty1` defined here
97 LL | pub struct XEmpty2;
98    | ------------------- similarly named unit struct `XEmpty2` defined here
99    |
100 help: use struct literal syntax instead
101    |
102 LL |     let xe1 = XEmpty1 {};
103    |               ~~~~~~~~~~
104 help: a unit struct with a similar name exists
105    |
106 LL |     let xe1 = XEmpty2();
107    |               ~~~~~~~
108
109 error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope
110   --> $DIR/empty-struct-braces-expr.rs:25:19
111    |
112 LL |     let xe3 = XE::Empty3;
113    |                   ^^^^^^
114    |                   |
115    |                   variant or associated item not found in `empty_struct::XE`
116    |                   help: there is a variant with a similar name: `XEmpty3`
117
118 error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope
119   --> $DIR/empty-struct-braces-expr.rs:26:19
120    |
121 LL |     let xe3 = XE::Empty3();
122    |                   ^^^^^^
123    |                   |
124    |                   variant or associated item not found in `empty_struct::XE`
125    |                   help: there is a variant with a similar name: `XEmpty3`
126
127 error[E0599]: no variant named `Empty1` found for enum `empty_struct::XE`
128   --> $DIR/empty-struct-braces-expr.rs:28:9
129    |
130 LL |     XE::Empty1 {};
131    |         ^^^^^^ help: there is a variant with a similar name: `XEmpty3`
132
133 error: aborting due to 9 previous errors
134
135 Some errors have detailed explanations: E0423, E0599.
136 For more information about an error, try `rustc --explain E0423`.