about summary refs log tree commit diff
path: root/tests/ui/empty/empty-struct-braces-expr.stderr
blob: a176107a06e24bb9612c51b8ca67c0832f033306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
error[E0423]: expected value, found struct `Empty1`
  --> $DIR/empty-struct-braces-expr.rs:15:14
   |
LL | struct Empty1 {}
   | ---------------- `Empty1` defined here
...
LL |     let e1 = Empty1;
   |              ^^^^^^
   |
  ::: $DIR/auxiliary/empty-struct.rs:2:1
   |
LL | pub struct XEmpty2;
   | ------------------ similarly named unit struct `XEmpty2` defined here
   |
help: use struct literal syntax instead
   |
LL |     let e1 = Empty1 {};
   |                     ++
help: a unit struct with a similar name exists
   |
LL -     let e1 = Empty1;
LL +     let e1 = XEmpty2;
   |

error[E0423]: expected value, found struct `XEmpty1`
  --> $DIR/empty-struct-braces-expr.rs:22:15
   |
LL |     let xe1 = XEmpty1;
   |               ^^^^^^^
   |
  ::: $DIR/auxiliary/empty-struct.rs:1:1
   |
LL | pub struct XEmpty1 {}
   | ------------------ `XEmpty1` defined here
LL | pub struct XEmpty2;
   | ------------------ similarly named unit struct `XEmpty2` defined here
   |
help: use struct literal syntax instead
   |
LL |     let xe1 = XEmpty1 {};
   |                       ++
help: a unit struct with a similar name exists
   |
LL -     let xe1 = XEmpty1;
LL +     let xe1 = XEmpty2;
   |

error[E0423]: expected function, tuple struct or tuple variant, found struct `Empty1`
  --> $DIR/empty-struct-braces-expr.rs:16:14
   |
LL | struct Empty1 {}
   | ---------------- `Empty1` defined here
...
LL |     let e1 = Empty1();
   |              ^^^^^^^^
   |
  ::: $DIR/auxiliary/empty-struct.rs:2:1
   |
LL | pub struct XEmpty2;
   | ------------------ similarly named unit struct `XEmpty2` defined here
   |
help: use struct literal syntax instead
   |
LL -     let e1 = Empty1();
LL +     let e1 = Empty1 {};
   |
help: a unit struct with a similar name exists
   |
LL -     let e1 = Empty1();
LL +     let e1 = XEmpty2();
   |

error[E0533]: expected value, found struct variant `E::Empty3`
  --> $DIR/empty-struct-braces-expr.rs:18:14
   |
LL |     let e3 = E::Empty3;
   |              ^^^^^^^^^ not a value
   |
help: you might have meant to create a new value of the struct
   |
LL |     let e3 = E::Empty3 {};
   |                        ++

error[E0533]: expected value, found struct variant `E::Empty3`
  --> $DIR/empty-struct-braces-expr.rs:19:14
   |
LL |     let e3 = E::Empty3();
   |              ^^^^^^^^^ not a value
   |
help: you might have meant to create a new value of the struct
   |
LL -     let e3 = E::Empty3();
LL +     let e3 = E::Empty3 {};
   |

error[E0423]: expected function, tuple struct or tuple variant, found struct `XEmpty1`
  --> $DIR/empty-struct-braces-expr.rs:23:15
   |
LL |     let xe1 = XEmpty1();
   |               ^^^^^^^^^
   |
  ::: $DIR/auxiliary/empty-struct.rs:1:1
   |
LL | pub struct XEmpty1 {}
   | ------------------ `XEmpty1` defined here
LL | pub struct XEmpty2;
   | ------------------ similarly named unit struct `XEmpty2` defined here
   |
help: use struct literal syntax instead
   |
LL -     let xe1 = XEmpty1();
LL +     let xe1 = XEmpty1 {};
   |
help: a unit struct with a similar name exists
   |
LL -     let xe1 = XEmpty1();
LL +     let xe1 = XEmpty2();
   |

error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope
  --> $DIR/empty-struct-braces-expr.rs:25:19
   |
LL |     let xe3 = XE::Empty3;
   |                   ^^^^^^ variant or associated item not found in `empty_struct::XE`
   |
help: there is a variant with a similar name
   |
LL |     let xe3 = XE::XEmpty3;
   |                   +

error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope
  --> $DIR/empty-struct-braces-expr.rs:26:19
   |
LL |     let xe3 = XE::Empty3();
   |                   ^^^^^^ variant or associated item not found in `empty_struct::XE`
   |
help: there is a variant with a similar name
   |
LL -     let xe3 = XE::Empty3();
LL +     let xe3 = XE::XEmpty3 {};
   |

error[E0599]: no variant named `Empty1` found for enum `empty_struct::XE`
  --> $DIR/empty-struct-braces-expr.rs:28:9
   |
LL |     XE::Empty1 {};
   |         ^^^^^^
   |
help: there is a variant with a similar name
   |
LL -     XE::Empty1 {};
LL +     XE::XEmpty3 {};
   |

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0423, E0533, E0599.
For more information about an error, try `rustc --explain E0423`.