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