Rustfmt tests

This commit is contained in:
Zaki Manian 2017-09-03 13:46:49 -07:00
parent 8b53f2238b
commit 44f694d0a1

View File

@ -4,42 +4,45 @@
#[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";
"baz"; "baz";
}; };
//lint should ignore false positive. // lint should ignore false positive.
let y = if true{ let y = if true {
"foo" "foo"
} else{ } else {
return; return;
}; };
//lint should note removing semicolon from "bar" // lint should note removing semicolon from "bar"
let z = if true{ let z = if true {
"foo"; "foo";
} else{ } else {
"bar"; "bar";
}; };
let a1 = Some(5); let a1 = Some(5);
//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;
},
}; };
} }