5 const NEG_ONE : i64 = -1;
8 #[allow(eq_op, no_effect)]
13 x + 0; //~ERROR the operation is ineffective
14 x + (1 - 1); //~ERROR the operation is ineffective
16 0 + x; //~ERROR the operation is ineffective
18 x - ZERO; //no error, as we skip lookups (for now)
19 x | (0); //~ERROR the operation is ineffective
20 ((ZERO)) | x; //no error, as we skip lookups (for now)
22 x * 1; //~ERROR the operation is ineffective
23 1 * x; //~ERROR the operation is ineffective
24 x / ONE; //no error, as we skip lookups (for now)
26 x / 2; //no false positive
28 x & NEG_ONE; //no error, as we skip lookups (for now)
29 -1 & x; //~ERROR the operation is ineffective