4 #![deny(absurd_extreme_comparisons)]
5 #![allow(unused, eq_op, no_effect, unnecessary_operation)]
12 //~^ ERROR this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
13 //~| HELP using u == 0 instead
15 //~^ ERROR this comparison involving
16 //~| HELP using u == Z instead
18 //~^ ERROR this comparison involving
19 //~| HELP comparison is always false
21 //~^ ERROR this comparison involving
22 //~| HELP using Z == u instead
24 //~^ ERROR this comparison involving
25 //~| HELP comparison is always false
27 //~^ ERROR this comparison involving
28 //~| HELP comparison is always false
30 //~^ ERROR this comparison involving
31 //~| HELP using u == std::u32::MAX instead
33 //~^ ERROR this comparison involving
34 //~| HELP comparison is always false
36 //~^ ERROR this comparison involving
37 //~| HELP using std::u32::MAX == u instead
40 //~^ ERROR this comparison involving
41 //~| HELP because 1-1 is the minimum value for this type, this comparison is always false
43 //~^ ERROR this comparison involving
44 //~| HELP because !0 is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == !0 instead
46 //~^ ERROR this comparison involving
47 //~| HELP because 12 - 2*6 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 12 - 2*6 instead
51 //~^ ERROR this comparison involving
52 //~| HELP comparison is always false
54 //~^ ERROR this comparison involving
55 //~| HELP comparison is always true
57 //~^ ERROR this comparison involving
58 //~| HELP comparison is always false
62 //~^ ERROR this comparison involving
63 //~| HELP using b == true instead
65 //~^ ERROR this comparison involving
66 //~| HELP comparison is always false
70 // this is handled by unit_cmp
71 () < {}; //~WARNING <-comparison of unit values detected.