2
0
Fork 0
mirror of https://github.com/rust-lang/rust-clippy synced 2024-12-28 14:03:21 +00:00
rust-clippy/tests/ui/assign_ops.fixed

22 lines
331 B
Rust
Raw Normal View History

2019-08-18 07:22:49 +00:00
// run-rustfix
#[allow(dead_code, unused_assignments)]
#[warn(clippy::assign_op_pattern)]
fn main() {
let mut a = 5;
a += 1;
a += 1;
a -= 1;
a *= 99;
a *= 42;
a /= 2;
a %= 5;
a &= 1;
a = 1 - a;
a = 5 / a;
a = 42 % a;
a = 6 << a;
let mut s = String::new();
s += "bla";
}