2 const NEG_ONE: i64 = -1;
7 impl std::ops::Shl<i32> for A {
9 fn shl(mut self, other: i32) -> Self {
10 self.0.push_str(&format!("{}", other));
17 clippy::unnecessary_operation,
21 #[warn(clippy::identity_op)]
31 x - ZERO; //no error, as we skip lookups (for now)
33 ((ZERO)) | x; //no error, as we skip lookups (for now)
37 x / ONE; //no error, as we skip lookups (for now)
39 x / 2; //no false positive
41 x & NEG_ONE; //no error, as we skip lookups (for now)
47 1 << 0; // no error, this case is allowed, see issue 3430
54 let mut a = A("".into());
55 let b = a << 0; // no error: non-integer