mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-24 03:53:20 +00:00
36 lines
439 B
Rust
36 lines
439 B
Rust
#![allow(unused, clippy::assign_op_pattern)]
|
|
|
|
fn main() {
|
|
let a;
|
|
a = "zero";
|
|
|
|
let b;
|
|
let c;
|
|
b = 1;
|
|
c = 2;
|
|
|
|
let d: usize;
|
|
d = 1;
|
|
|
|
let mut e;
|
|
e = 1;
|
|
e = 2;
|
|
|
|
let f;
|
|
match 1 {
|
|
1 => f = "three",
|
|
_ => return,
|
|
}; // has semi
|
|
|
|
let g: usize;
|
|
if true {
|
|
g = 5;
|
|
} else {
|
|
panic!();
|
|
}
|
|
|
|
let h;
|
|
h = format!("{}", e);
|
|
|
|
println!("{}", a);
|
|
}
|