blob: 36d5c7806fe84a17c62aef8d5c4031d5fc0a5302 [file] [log] [blame] [edit]
#![warn(clippy::unnecessary_semicolon)]
#![feature(postfix_match)]
fn no_lint(mut x: u32) -> Option<u32> {
Some(())?;
{
let y = 3;
dbg!(x + y)
};
{
let (mut a, mut b) = (10, 20);
(a, b) = (b + 1, a + 1);
}
Some(0)
}
fn main() {
let mut a = 3;
if a == 2 {
println!("This is weird");
}
//~^ ERROR: unnecessary semicolon
a.match {
3 => println!("three"),
_ => println!("not three"),
}
//~^ ERROR: unnecessary semicolon
}