rust-clippy/tests/ui/erasing_op.rs

10 lines
123 B
Rust
Raw Normal View History

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