@@ -219,13 +219,13 @@ LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]);
219
219
| + +
220
220
221
221
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:`
222
- --> $DIR/issue-35813-postfix-after-cast.rs:134 :36
222
+ --> $DIR/issue-35813-postfix-after-cast.rs:133 :36
223
223
|
224
224
LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
225
225
| ^ expected one of `)`, `,`, `.`, `?`, or an operator
226
226
227
227
error: cast cannot be followed by `?`
228
- --> $DIR/issue-35813-postfix-after-cast.rs:139 :5
228
+ --> $DIR/issue-35813-postfix-after-cast.rs:138 :5
229
229
|
230
230
LL | Err(0u64) as Result<u64,u64>?;
231
231
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -236,25 +236,25 @@ LL | (Err(0u64) as Result<u64,u64>)?;
236
236
| + +
237
237
238
238
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
239
- --> $DIR/issue-35813-postfix-after-cast.rs:141 :14
239
+ --> $DIR/issue-35813-postfix-after-cast.rs:140 :14
240
240
|
241
241
LL | Err(0u64): Result<u64,u64>?;
242
242
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
243
243
244
244
error: expected identifier, found `:`
245
- --> $DIR/issue-35813-postfix-after-cast.rs:153 :13
245
+ --> $DIR/issue-35813-postfix-after-cast.rs:152 :13
246
246
|
247
247
LL | drop_ptr: F();
248
248
| ^ expected identifier
249
249
250
250
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
251
- --> $DIR/issue-35813-postfix-after-cast.rs:160 :13
251
+ --> $DIR/issue-35813-postfix-after-cast.rs:159 :13
252
252
|
253
253
LL | drop_ptr: fn(u8);
254
254
| ^ expected one of 8 possible tokens
255
255
256
256
error: cast cannot be followed by a function call
257
- --> $DIR/issue-35813-postfix-after-cast.rs:166 :5
257
+ --> $DIR/issue-35813-postfix-after-cast.rs:165 :5
258
258
|
259
259
LL | drop as fn(u8)(0);
260
260
| ^^^^^^^^^^^^^^
@@ -265,13 +265,13 @@ LL | (drop as fn(u8))(0);
265
265
| + +
266
266
267
267
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
268
- --> $DIR/issue-35813-postfix-after-cast.rs:168 :13
268
+ --> $DIR/issue-35813-postfix-after-cast.rs:167 :13
269
269
|
270
270
LL | drop_ptr: fn(u8)(0);
271
271
| ^ expected one of 8 possible tokens
272
272
273
273
error: cast cannot be followed by `.await`
274
- --> $DIR/issue-35813-postfix-after-cast.rs:173 :5
274
+ --> $DIR/issue-35813-postfix-after-cast.rs:172 :5
275
275
|
276
276
LL | Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await;
277
277
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -282,13 +282,13 @@ LL | (Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>).await;
282
282
| + +
283
283
284
284
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
285
- --> $DIR/issue-35813-postfix-after-cast.rs:176 :21
285
+ --> $DIR/issue-35813-postfix-after-cast.rs:175 :21
286
286
|
287
287
LL | Box::pin(noop()): Pin<Box<_>>.await;
288
288
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
289
289
290
290
error: cast cannot be followed by a field access
291
- --> $DIR/issue-35813-postfix-after-cast.rs:188 :5
291
+ --> $DIR/issue-35813-postfix-after-cast.rs:187 :5
292
292
|
293
293
LL | Foo::default() as Foo.bar;
294
294
| ^^^^^^^^^^^^^^^^^^^^^
@@ -299,7 +299,7 @@ LL | (Foo::default() as Foo).bar;
299
299
| + +
300
300
301
301
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
302
- --> $DIR/issue-35813-postfix-after-cast.rs:190 :19
302
+ --> $DIR/issue-35813-postfix-after-cast.rs:189 :19
303
303
|
304
304
LL | Foo::default(): Foo.bar;
305
305
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
@@ -322,21 +322,11 @@ LL | if true { 33 } else { 44 }: i32.max(0)
322
322
| ^ expected one of `,`, `.`, `?`, or an operator
323
323
324
324
error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
325
- --> $DIR/issue-35813-postfix-after-cast.rs:151 :13
325
+ --> $DIR/issue-35813-postfix-after-cast.rs:150 :13
326
326
|
327
327
LL | drop as F();
328
328
| ^^^ only `Fn` traits may use parentheses
329
329
330
- error[E0015]: cannot call non-const operator in statics
331
- --> $DIR/issue-35813-postfix-after-cast.rs:130:42
332
- |
333
- LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
334
- | ^^^^^^
335
- |
336
- = note: calls in statics are limited to constant functions, tuple structs and tuple variants
337
- = note: consider wrapping this expression in `std::sync::LazyLock::new(|| ...)`
338
-
339
- error: aborting due to 40 previous errors
330
+ error: aborting due to 39 previous errors
340
331
341
- Some errors have detailed explanations: E0015, E0214.
342
- For more information about an error, try `rustc --explain E0015`.
332
+ For more information about this error, try `rustc --explain E0214`.
0 commit comments