rust/tests/ui/erasing_op.rs

13 lines
149 B
Rust
Raw Normal View History

2018-07-28 17:34:52 +02:00
#![feature(tool_lints)]
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;
}