rust/tests/ui/match/postfix-match/match-after-as.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
741 B
Plaintext
Raw Normal View History

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
|
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`.