mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
38d4ac7cea
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
20 lines
342 B
Rust
20 lines
342 B
Rust
#[allow(dead_code, unused_assignments)]
|
|
#[warn(clippy::assign_op_pattern)]
|
|
fn main() {
|
|
let mut a = 5;
|
|
a = a + 1;
|
|
a = 1 + a;
|
|
a = a - 1;
|
|
a = a * 99;
|
|
a = 42 * a;
|
|
a = a / 2;
|
|
a = a % 5;
|
|
a = a & 1;
|
|
a = 1 - a;
|
|
a = 5 / a;
|
|
a = 42 % a;
|
|
a = 6 << a;
|
|
let mut s = String::new();
|
|
s = s + "bla";
|
|
}
|