Fix tidy
This commit is contained in:
parent
bd1feb8cef
commit
147faa54d5
@ -0,0 +1,12 @@
|
||||
// run-rustfix
|
||||
fn main() {
|
||||
let val = 42;
|
||||
let x = match val {
|
||||
0 if true => {
|
||||
//~^ ERROR unexpected parentheses surrounding `match` arm pattern
|
||||
42u8
|
||||
}
|
||||
_ => 0u8,
|
||||
};
|
||||
let _y: u32 = x.into(); //~ ERROR mismatched types
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
// run-rustfix
|
||||
fn main() {
|
||||
let val = 42;
|
||||
let x = match val {
|
||||
|
@ -1,5 +1,5 @@
|
||||
error: unexpected parentheses surrounding `match` arm pattern
|
||||
--> $DIR/recover-parens-around-match-arm-head.rs:4:9
|
||||
--> $DIR/recover-parens-around-match-arm-head.rs:5:9
|
||||
|
|
||||
LL | (0 if true) => {
|
||||
| ^ ^
|
||||
@ -11,7 +11,7 @@ LL + 0 if true => {
|
||||
|
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/recover-parens-around-match-arm-head.rs:10:19
|
||||
--> $DIR/recover-parens-around-match-arm-head.rs:11:19
|
||||
|
|
||||
LL | let _y: u32 = x;
|
||||
| --- ^ expected `u32`, found `u8`
|
||||
|
Loading…
x
Reference in New Issue
Block a user