|
| 1 | +error: casts followed by index operators are not supported |
| 2 | + --> $DIR/issue-35813-postfix-after-cast.rs:9:5 |
| 3 | + | |
| 4 | +LL | vec![1, 2, 3] as Vec<i32>[0]; |
| 5 | + | -------------------------^^^ |
| 6 | + | | |
| 7 | + | help: try surrounding the expression with parentheses: `(vec![1, 2, 3] as Vec<i32>)` |
| 8 | + |
| 9 | +error: casts followed by index operators are not supported |
| 10 | + --> $DIR/issue-35813-postfix-after-cast.rs:14:5 |
| 11 | + | |
| 12 | +LL | (&[0]) as &[i32][0]; |
| 13 | + | ----------------^^^ |
| 14 | + | | |
| 15 | + | help: try surrounding the expression with parentheses: `((&[0]) as &[i32])` |
| 16 | + |
| 17 | +error: casts followed by index operators are not supported |
| 18 | + --> $DIR/issue-35813-postfix-after-cast.rs:20:18 |
| 19 | + | |
| 20 | +LL | let x: i32 = &vec![1, 2, 3] as &Vec<i32>[0]; |
| 21 | + | ---------------------------^^^ |
| 22 | + | | |
| 23 | + | help: try surrounding the expression with parentheses: `(&vec![1, 2, 3] as &Vec<i32>)` |
| 24 | + |
| 25 | +error: casts followed by method call expressions are not supported |
| 26 | + --> $DIR/issue-35813-postfix-after-cast.rs:33:8 |
| 27 | + | |
| 28 | +LL | if 5u64 as i32.max(0) == 0 { |
| 29 | + | -----------^^^^^^^ |
| 30 | + | | |
| 31 | + | help: try surrounding the expression with parentheses: `(5u64 as i32)` |
| 32 | + |
| 33 | +error: casts followed by method call expressions are not supported |
| 34 | + --> $DIR/issue-35813-postfix-after-cast.rs:40:9 |
| 35 | + | |
| 36 | +LL | 5u64 as u32.max(0) == 0 |
| 37 | + | -----------^^^^^^^ |
| 38 | + | | |
| 39 | + | help: try surrounding the expression with parentheses: `(5u64 as u32)` |
| 40 | + |
| 41 | +error: casts followed by index operators are not supported |
| 42 | + --> $DIR/issue-35813-postfix-after-cast.rs:45:24 |
| 43 | + | |
| 44 | +LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]); |
| 45 | + | ------------------^^^^^^ |
| 46 | + | | |
| 47 | + | help: try surrounding the expression with parentheses: `(&[1,2,3] as &[i32])` |
| 48 | + |
| 49 | +error: casts followed by awaits are not supported |
| 50 | + --> $DIR/issue-35813-postfix-after-cast.rs:49:5 |
| 51 | + | |
| 52 | +LL | Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await; |
| 53 | + | -----------------------------------------------------^^^^^^ |
| 54 | + | | |
| 55 | + | help: try surrounding the expression with parentheses: `(Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>)` |
| 56 | + |
| 57 | +error: casts followed by field access expressions are not supported |
| 58 | + --> $DIR/issue-35813-postfix-after-cast.rs:61:5 |
| 59 | + | |
| 60 | +LL | Foo::default() as Foo.bar; |
| 61 | + | ---------------------^^^^ |
| 62 | + | | |
| 63 | + | help: try surrounding the expression with parentheses: `(Foo::default() as Foo)` |
| 64 | + |
| 65 | +error: casts followed by method call expressions are not supported |
| 66 | + --> $DIR/issue-35813-postfix-after-cast.rs:27:9 |
| 67 | + | |
| 68 | +LL | if true { 33 } else { 44 } as i32.max(0) |
| 69 | + | ---------------------------------^^^^^^^ |
| 70 | + | | |
| 71 | + | help: try surrounding the expression with parentheses: `(if true { 33 } else { 44 } as i32)` |
| 72 | + |
| 73 | +error: aborting due to 9 previous errors |
| 74 | + |
0 commit comments