]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/absurd-extreme-comparisons.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / absurd-extreme-comparisons.stderr
1 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
2 --> $DIR/absurd-extreme-comparisons.rs:10:5
3 |
4 10 | u <= 0;
5 | ^^^^^^
6 |
7 = note: `-D absurd-extreme-comparisons` implied by `-D warnings`
8 = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == 0 instead
9
10 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
11 --> $DIR/absurd-extreme-comparisons.rs:11:5
12 |
13 11 | u <= Z;
14 | ^^^^^^
15 |
16 = help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using u == Z instead
17
18 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
19 --> $DIR/absurd-extreme-comparisons.rs:12:5
20 |
21 12 | u < Z;
22 | ^^^^^
23 |
24 = help: because Z is the minimum value for this type, this comparison is always false
25
26 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
27 --> $DIR/absurd-extreme-comparisons.rs:13:5
28 |
29 13 | Z >= u;
30 | ^^^^^^
31 |
32 = help: because Z is the minimum value for this type, the case where the two sides are not equal never occurs, consider using Z == u instead
33
34 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
35 --> $DIR/absurd-extreme-comparisons.rs:14:5
36 |
37 14 | Z > u;
38 | ^^^^^
39 |
40 = help: because Z is the minimum value for this type, this comparison is always false
41
42 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
43 --> $DIR/absurd-extreme-comparisons.rs:15:5
44 |
45 15 | u > std::u32::MAX;
46 | ^^^^^^^^^^^^^^^^^
47 |
48 = help: because std::u32::MAX is the maximum value for this type, this comparison is always false
49
50 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
51 --> $DIR/absurd-extreme-comparisons.rs:16:5
52 |
53 16 | u >= std::u32::MAX;
54 | ^^^^^^^^^^^^^^^^^^
55 |
56 = help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using u == std::u32::MAX instead
57
58 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
59 --> $DIR/absurd-extreme-comparisons.rs:17:5
60 |
61 17 | std::u32::MAX < u;
62 | ^^^^^^^^^^^^^^^^^
63 |
64 = help: because std::u32::MAX is the maximum value for this type, this comparison is always false
65
66 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
67 --> $DIR/absurd-extreme-comparisons.rs:18:5
68 |
69 18 | std::u32::MAX <= u;
70 | ^^^^^^^^^^^^^^^^^^
71 |
72 = help: because std::u32::MAX is the maximum value for this type, the case where the two sides are not equal never occurs, consider using std::u32::MAX == u instead
73
74 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
75 --> $DIR/absurd-extreme-comparisons.rs:19:5
76 |
77 19 | 1-1 > u;
78 | ^^^^^^^
79 |
80 = help: because 1-1 is the minimum value for this type, this comparison is always false
81
82 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
83 --> $DIR/absurd-extreme-comparisons.rs:20:5
84 |
85 20 | u >= !0;
86 | ^^^^^^^
87 |
88 = 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
89
90 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
91 --> $DIR/absurd-extreme-comparisons.rs:21:5
92 |
93 21 | u <= 12 - 2*6;
94 | ^^^^^^^^^^^^^
95 |
96 = 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
97
98 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
99 --> $DIR/absurd-extreme-comparisons.rs:23:5
100 |
101 23 | i < -127 - 1;
102 | ^^^^^^^^^^^^
103 |
104 = help: because -127 - 1 is the minimum value for this type, this comparison is always false
105
106 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
107 --> $DIR/absurd-extreme-comparisons.rs:24:5
108 |
109 24 | std::i8::MAX >= i;
110 | ^^^^^^^^^^^^^^^^^
111 |
112 = help: because std::i8::MAX is the maximum value for this type, this comparison is always true
113
114 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
115 --> $DIR/absurd-extreme-comparisons.rs:25:5
116 |
117 25 | 3-7 < std::i32::MIN;
118 | ^^^^^^^^^^^^^^^^^^^
119 |
120 = help: because std::i32::MIN is the minimum value for this type, this comparison is always false
121
122 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
123 --> $DIR/absurd-extreme-comparisons.rs:27:5
124 |
125 27 | b >= true;
126 | ^^^^^^^^^
127 |
128 = help: because true is the maximum value for this type, the case where the two sides are not equal never occurs, consider using b == true instead
129
130 error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
131 --> $DIR/absurd-extreme-comparisons.rs:28:5
132 |
133 28 | false > b;
134 | ^^^^^^^^^
135 |
136 = help: because false is the minimum value for this type, this comparison is always false
137
138 error: <-comparison of unit values detected. This will always be false
139 --> $DIR/absurd-extreme-comparisons.rs:31:5
140 |
141 31 | () < {};
142 | ^^^^^^^
143 |
144 = note: `-D unit-cmp` implied by `-D warnings`
145