@@ -120,7 +120,7 @@ LL | while || (Foo { x: 3 }).hi() {
120
120
| + +
121
121
122
122
error: struct literals are not allowed here
123
- --> $DIR/struct-literals-in-invalid-places.rs:49 :8
123
+ --> $DIR/struct-literals-in-invalid-places.rs:53 :8
124
124
|
125
125
LL | if Foo { x: one(), }.hi() {
126
126
| ^^^^^^^^^^^^^^^^^
@@ -130,6 +130,49 @@ help: surround the struct literal with parentheses
130
130
LL | if (Foo { x: one(), }).hi() {
131
131
| + +
132
132
133
+ error: struct literals are not allowed here
134
+ --> $DIR/struct-literals-in-invalid-places.rs:61:15
135
+ |
136
+ LL | if FOO == self::Foo { x: one() } {}
137
+ | ^^^^^^^^^^^^^^^^^^^^^^
138
+ |
139
+ help: surround the struct literal with parentheses
140
+ |
141
+ LL | if FOO == (self::Foo { x: one() }) {}
142
+ | + +
143
+
144
+ error: struct literals are not allowed here
145
+ --> $DIR/struct-literals-in-invalid-places.rs:63:15
146
+ |
147
+ LL | if FOO == Foo::<> { x: one() } {}
148
+ | ^^^^^^^^^^^^^^^^^^^^
149
+ |
150
+ help: surround the struct literal with parentheses
151
+ |
152
+ LL | if FOO == (Foo::<> { x: one() }) {}
153
+ | + +
154
+
155
+ error: struct literals are not allowed here
156
+ --> $DIR/struct-literals-in-invalid-places.rs:66:19
157
+ |
158
+ LL | if FOO == <T as Trait>::Out { x: one() } {}
159
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160
+ |
161
+ help: surround the struct literal with parentheses
162
+ |
163
+ LL | if FOO == (<T as Trait>::Out { x: one() }) {}
164
+ | + +
165
+
166
+ error[E0658]: usage of qualified paths in this context is experimental
167
+ --> $DIR/struct-literals-in-invalid-places.rs:66:19
168
+ |
169
+ LL | if FOO == <T as Trait>::Out { x: one() } {}
170
+ | ^^^^^^^^^^^^^^^^^
171
+ |
172
+ = note: see issue #86935 <https://github.com/rust-lang/rust/issues/86935> for more information
173
+ = help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable
174
+ = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
175
+
133
176
error[E0277]: `bool` is not an iterator
134
177
--> $DIR/struct-literals-in-invalid-places.rs:9:14
135
178
|
@@ -185,7 +228,7 @@ help: use parentheses to call this closure
185
228
LL | while (|| Foo { x: 3 }.hi())() {
186
229
| + +++
187
230
188
- error: aborting due to 17 previous errors
231
+ error: aborting due to 21 previous errors
189
232
190
- Some errors have detailed explanations: E0277, E0308, E0533.
233
+ Some errors have detailed explanations: E0277, E0308, E0533, E0658 .
191
234
For more information about an error, try `rustc --explain E0277`.
0 commit comments