4 #![deny(integer_arithmetic, float_arithmetic)]
5 #![allow(unused, shadow_reuse, shadow_unrelated, no_effect, unnecessary_operation)]
8 1 + i; //~ERROR integer arithmetic detected
9 i * 2; //~ERROR integer arithmetic detected
10 1 % //~ERROR integer arithmetic detected
11 i / 2; // no error, this is part of the expression in the preceding line
12 i - 2 + 2 - i; //~ERROR integer arithmetic detected
13 -i; //~ERROR integer arithmetic detected
23 f * 2.0; //~ERROR floating-point arithmetic detected
25 1.0 + f; //~ERROR floating-point arithmetic detected
26 f * 2.0; //~ERROR floating-point arithmetic detected
27 f / 2.0; //~ERROR floating-point arithmetic detected
28 f - 2.0 * 4.2; //~ERROR floating-point arithmetic detected
29 -f; //~ERROR floating-point arithmetic detected