@@ -219,13 +219,13 @@ LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]);
219219 | + +
220220
221221error: 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
223223 |
224224LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
225225 | ^ expected one of `)`, `,`, `.`, `?`, or an operator
226226
227227error: 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
229229 |
230230LL | Err(0u64) as Result<u64,u64>?;
231231 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -236,25 +236,25 @@ LL | (Err(0u64) as Result<u64,u64>)?;
236236 | + +
237237
238238error: 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
240240 |
241241LL | Err(0u64): Result<u64,u64>?;
242242 | ^ expected one of `.`, `;`, `?`, `}`, or an operator
243243
244244error: expected identifier, found `:`
245- --> $DIR/issue-35813-postfix-after-cast.rs:153 :13
245+ --> $DIR/issue-35813-postfix-after-cast.rs:152 :13
246246 |
247247LL | drop_ptr: F();
248248 | ^ expected identifier
249249
250250error: 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
252252 |
253253LL | drop_ptr: fn(u8);
254254 | ^ expected one of 8 possible tokens
255255
256256error: 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
258258 |
259259LL | drop as fn(u8)(0);
260260 | ^^^^^^^^^^^^^^
@@ -265,13 +265,13 @@ LL | (drop as fn(u8))(0);
265265 | + +
266266
267267error: 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
269269 |
270270LL | drop_ptr: fn(u8)(0);
271271 | ^ expected one of 8 possible tokens
272272
273273error: 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
275275 |
276276LL | Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await;
277277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -282,13 +282,13 @@ LL | (Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>).await;
282282 | + +
283283
284284error: 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
286286 |
287287LL | Box::pin(noop()): Pin<Box<_>>.await;
288288 | ^ expected one of `.`, `;`, `?`, `}`, or an operator
289289
290290error: 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
292292 |
293293LL | Foo::default() as Foo.bar;
294294 | ^^^^^^^^^^^^^^^^^^^^^
@@ -299,7 +299,7 @@ LL | (Foo::default() as Foo).bar;
299299 | + +
300300
301301error: 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
303303 |
304304LL | Foo::default(): Foo.bar;
305305 | ^ expected one of `.`, `;`, `?`, `}`, or an operator
@@ -322,21 +322,11 @@ LL | if true { 33 } else { 44 }: i32.max(0)
322322 | ^ expected one of `,`, `.`, `?`, or an operator
323323
324324error[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
326326 |
327327LL | drop as F();
328328 | ^^^ only `Fn` traits may use parentheses
329329
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
340331
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