rust/tests/ui/erasing_op.rs

10 lines
123 B
Rust
Raw Normal View History

2018-07-28 17:34:52 +02:00
#[allow(clippy::no_effect)]
#[warn(clippy::erasing_op)]
fn main() {
let x: u8 = 0;
x * 0;
0 & x;
0 / x;
}