2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by indexing
|
2020-02-15 18:20:53 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:10:5
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | vec![1, 2, 3] as Vec<i32>[0];
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (vec![1, 2, 3] as Vec<i32>)[0];
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:12:18
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | vec![1, 2, 3]: Vec<i32>[0];
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by indexing
|
2020-02-15 18:20:53 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:17:5
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | (&[0]) as &[i32][0];
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | ((&[0]) as &[i32])[0];
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:19:14
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | (&[0i32]): &[i32; 1][0];
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
|
|
|
|
|
|
|
error: expected `{`, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:27:12
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | if 5u64: u64: u64 == 0u64 {
|
|
|
|
| ^ expected `{`
|
2022-03-18 22:45:15 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
note: the `if` expression is missing a block after this condition
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:27:8
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | if 5u64: u64: u64 == 0u64 {
|
|
|
|
| ^^^^
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:39:17
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0i32: i32: i32.count_ones();
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `!`, `(`, `.`, `::`, `;`, `<`, `?`, or `else`, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:43:21
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as i32: i32.count_ones();
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of 8 possible tokens
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:47:17
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0i32: i32 as i32.count_ones();
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:51:13
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as i32 as i32.count_ones();
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | let _ = (0 as i32 as i32).count_ones();
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:56:17
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0i32: i32: i32 as u32 as i32.count_ones();
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:60:17
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0i32: i32.count_ones(): u32;
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:64:13
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as i32.count_ones(): u32;
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | let _ = (0 as i32).count_ones(): u32;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, or `else`, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:64:34
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | let _ = 0 as i32.count_ones(): u32;
|
|
|
|
| ^ expected one of `.`, `;`, `?`, or `else`
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:69:17
|
2022-03-18 22:45:15 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | let _ = 0i32: i32.count_ones() as u32;
|
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:73:13
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0 as i32.count_ones() as u32;
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | let _ = (0 as i32).count_ones() as u32;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:78:17
|
2020-02-22 13:36:09 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0i32: i32: i32.count_ones() as u32 as i32;
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
2020-02-22 14:33:06 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:82:13
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
|
|
|
LL | let _ = 0
|
|
|
|
| _____________^
|
|
|
|
LL | | as i32
|
|
|
|
| |______________^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL ~ let _ = (0
|
|
|
|
LL ~ as i32)
|
2020-02-22 14:33:06 -06:00
|
|
|
|
|
2020-02-22 13:36:09 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by indexing
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:90:18
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | let x: i32 = &vec![1, 2, 3] as &Vec<i32>[0];
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | let x: i32 = (&vec![1, 2, 3] as &Vec<i32>)[0];
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:95:5
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | 0 as i32.max(0);
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (0 as i32).max(0);
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:97:6
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | 0: i32.max(0);
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:111:8
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | if 5u64 as i32.max(0) == 0 {
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | if (5u64 as i32).max(0) == 0 {
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected `{`, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:114:12
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | if 5u64: u64.max(0) == 0 {
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected `{`
|
2022-03-18 22:45:15 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
note: the `if` expression is missing a block after this condition
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:114:8
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | if 5u64: u64.max(0) == 0 {
|
|
|
|
| ^^^^
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:121:9
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | 5u64 as u32.max(0) == 0
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (5u64 as u32).max(0) == 0
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:125:13
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | 5u64: u64.max(0) == 0
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by indexing
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:130:24
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]);
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:133:36
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `)`, `,`, `.`, `?`, or an operator
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by `?`
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:138:5
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | Err(0u64) as Result<u64,u64>?;
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (Err(0u64) as Result<u64,u64>)?;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:140:14
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | Err(0u64): Result<u64,u64>?;
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
|
|
|
|
|
|
|
error: expected identifier, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:152:13
|
2020-07-09 11:09:25 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | drop_ptr: F();
|
|
|
|
| ^ expected identifier
|
2022-03-18 22:45:15 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
= note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
|
|
|
|
|
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:159:13
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
LL | drop_ptr: fn(u8);
|
|
|
|
| ^ expected one of 8 possible tokens
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a function call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:165:5
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | drop as fn(u8)(0);
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (drop as fn(u8))(0);
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:167:13
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | drop_ptr: fn(u8)(0);
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of 8 possible tokens
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by `.await`
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:172:5
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await;
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>).await;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:175:21
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | Box::pin(noop()): Pin<Box<_>>.await;
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a field access
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:187:5
|
2020-02-08 23:34:38 -06:00
|
|
|
|
|
|
|
|
LL | Foo::default() as Foo.bar;
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (Foo::default() as Foo).bar;
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:189:19
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | Foo::default(): Foo.bar;
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `.`, `;`, `?`, `}`, or an operator
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-07-29 02:01:58 -05:00
|
|
|
error: cast cannot be followed by a method call
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:103:9
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | if true { 33 } else { 44 } as i32.max(0),
|
2020-02-22 14:33:06 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (if true { 33 } else { 44 } as i32).max(0),
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2020-02-15 18:20:53 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: expected one of `,`, `.`, `?`, or an operator, found `:`
|
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:105:35
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | if true { 33 } else { 44 }: i32.max(0)
|
2022-11-16 14:46:06 -06:00
|
|
|
| ^ expected one of `,`, `.`, `?`, or an operator
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
|
2022-11-16 14:46:06 -06:00
|
|
|
--> $DIR/issue-35813-postfix-after-cast.rs:150:13
|
2020-02-15 18:20:53 -06:00
|
|
|
|
|
|
|
|
LL | drop as F();
|
|
|
|
| ^^^ only `Fn` traits may use parentheses
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2022-11-16 14:46:06 -06:00
|
|
|
error: aborting due to 39 previous errors
|
2020-02-08 23:34:38 -06:00
|
|
|
|
2020-02-15 18:20:53 -06:00
|
|
|
For more information about this error, try `rustc --explain E0214`.
|