2024-04-02 17:31:42 -05:00
|
|
|
error: cast cannot be followed by a postfix match
|
|
|
|
--> $DIR/match-after-as.rs:4:5
|
|
|
|
|
|
|
|
|
LL | 1 as i32.match {};
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try surrounding the expression in parentheses
|
|
|
|
|
|
|
|
|
LL | (1 as i32).match {};
|
|
|
|
| + +
|
|
|
|
|
|
|
|
error[E0004]: non-exhaustive patterns: type `i32` is non-empty
|
|
|
|
--> $DIR/match-after-as.rs:4:5
|
|
|
|
|
|
|
|
|
LL | 1 as i32.match {};
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: the matched value is of type `i32`
|
|
|
|
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
|
|
|
|
|
2024-04-02 18:06:28 -05:00
|
|
|
LL ~ 1 as i32.match {
|
2024-04-02 17:31:42 -05:00
|
|
|
LL + _ => todo!(),
|
|
|
|
LL ~ };
|
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0004`.
|