mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Rustfmt tests
This commit is contained in:
parent
8b53f2238b
commit
44f694d0a1
1 changed files with 19 additions and 16 deletions
|
@ -4,7 +4,6 @@
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
||||||
// lint should note removing the semicolon from "baz"
|
// lint should note removing the semicolon from "baz"
|
||||||
let x = {
|
let x = {
|
||||||
"foo";
|
"foo";
|
||||||
|
@ -32,14 +31,18 @@ fn main() {
|
||||||
// lint should ignore false positive
|
// lint should ignore false positive
|
||||||
let a2 = match a1 {
|
let a2 = match a1 {
|
||||||
Some(x) => x,
|
Some(x) => x,
|
||||||
_ => {return;},
|
_ => {
|
||||||
|
return;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// lint should note removing the semicolon after `x;`
|
// lint should note removing the semicolon after `x;`
|
||||||
let a3 = match a1 {
|
let a3 = match a1 {
|
||||||
Some(x) => {x;},
|
Some(x) => {
|
||||||
_ => {0;},
|
x;
|
||||||
|
},
|
||||||
|
_ => {
|
||||||
|
0;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue