]> git.lizzy.rs Git - rust.git/blob - tests/ui/eq_op.stderr
Move linting of `assert` macros from early to late pass
[rust.git] / tests / ui / eq_op.stderr
1 error: equal expressions as operands to `==`
2   --> $DIR/eq_op.rs:11:5
3    |
4 LL |     1 == 1;
5    |     ^^^^^^
6    |
7    = note: `-D clippy::eq-op` implied by `-D warnings`
8
9 error: equal expressions as operands to `==`
10   --> $DIR/eq_op.rs:12:5
11    |
12 LL |     "no" == "no";
13    |     ^^^^^^^^^^^^
14
15 error: equal expressions as operands to `!=`
16   --> $DIR/eq_op.rs:14:5
17    |
18 LL |     false != false;
19    |     ^^^^^^^^^^^^^^
20
21 error: equal expressions as operands to `<`
22   --> $DIR/eq_op.rs:15:5
23    |
24 LL |     1.5 < 1.5;
25    |     ^^^^^^^^^
26
27 error: equal expressions as operands to `>=`
28   --> $DIR/eq_op.rs:16:5
29    |
30 LL |     1u64 >= 1u64;
31    |     ^^^^^^^^^^^^
32
33 error: equal expressions as operands to `&`
34   --> $DIR/eq_op.rs:19:5
35    |
36 LL |     (1 as u64) & (1 as u64);
37    |     ^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: equal expressions as operands to `^`
40   --> $DIR/eq_op.rs:20:5
41    |
42 LL |     1 ^ ((((((1))))));
43    |     ^^^^^^^^^^^^^^^^^
44
45 error: equal expressions as operands to `<`
46   --> $DIR/eq_op.rs:23:5
47    |
48 LL |     (-(2) < -(2));
49    |     ^^^^^^^^^^^^^
50
51 error: equal expressions as operands to `==`
52   --> $DIR/eq_op.rs:24:5
53    |
54 LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
55    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57 error: equal expressions as operands to `&`
58   --> $DIR/eq_op.rs:24:6
59    |
60 LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
61    |      ^^^^^^^^^^^^^^^^^
62
63 error: equal expressions as operands to `&`
64   --> $DIR/eq_op.rs:24:27
65    |
66 LL |     ((1 + 1) & (1 + 1) == (1 + 1) & (1 + 1));
67    |                           ^^^^^^^^^^^^^^^^^
68
69 error: equal expressions as operands to `==`
70   --> $DIR/eq_op.rs:25:5
71    |
72 LL |     (1 * 2) + (3 * 4) == 1 * 2 + 3 * 4;
73    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
74
75 error: equal expressions as operands to `!=`
76   --> $DIR/eq_op.rs:28:5
77    |
78 LL |     ([1] != [1]);
79    |     ^^^^^^^^^^^^
80
81 error: equal expressions as operands to `!=`
82   --> $DIR/eq_op.rs:29:5
83    |
84 LL |     ((1, 2) != (1, 2));
85    |     ^^^^^^^^^^^^^^^^^^
86
87 error: equal expressions as operands to `==`
88   --> $DIR/eq_op.rs:33:5
89    |
90 LL |     1 + 1 == 2;
91    |     ^^^^^^^^^^
92
93 error: equal expressions as operands to `==`
94   --> $DIR/eq_op.rs:34:5
95    |
96 LL |     1 - 1 == 0;
97    |     ^^^^^^^^^^
98
99 error: equal expressions as operands to `-`
100   --> $DIR/eq_op.rs:34:5
101    |
102 LL |     1 - 1 == 0;
103    |     ^^^^^
104
105 error: equal expressions as operands to `-`
106   --> $DIR/eq_op.rs:36:5
107    |
108 LL |     1 - 1;
109    |     ^^^^^
110
111 error: equal expressions as operands to `/`
112   --> $DIR/eq_op.rs:37:5
113    |
114 LL |     1 / 1;
115    |     ^^^^^
116
117 error: equal expressions as operands to `&&`
118   --> $DIR/eq_op.rs:38:5
119    |
120 LL |     true && true;
121    |     ^^^^^^^^^^^^
122
123 error: equal expressions as operands to `||`
124   --> $DIR/eq_op.rs:40:5
125    |
126 LL |     true || true;
127    |     ^^^^^^^^^^^^
128
129 error: equal expressions as operands to `&&`
130   --> $DIR/eq_op.rs:46:5
131    |
132 LL |     a == b && b == a;
133    |     ^^^^^^^^^^^^^^^^
134
135 error: equal expressions as operands to `&&`
136   --> $DIR/eq_op.rs:47:5
137    |
138 LL |     a != b && b != a;
139    |     ^^^^^^^^^^^^^^^^
140
141 error: equal expressions as operands to `&&`
142   --> $DIR/eq_op.rs:48:5
143    |
144 LL |     a < b && b > a;
145    |     ^^^^^^^^^^^^^^
146
147 error: equal expressions as operands to `&&`
148   --> $DIR/eq_op.rs:49:5
149    |
150 LL |     a <= b && b >= a;
151    |     ^^^^^^^^^^^^^^^^
152
153 error: equal expressions as operands to `==`
154   --> $DIR/eq_op.rs:52:5
155    |
156 LL |     a == a;
157    |     ^^^^^^
158
159 error: equal expressions as operands to `/`
160   --> $DIR/eq_op.rs:62:20
161    |
162 LL |     const D: u32 = A / A;
163    |                    ^^^^^
164
165 error: identical args used in this `assert_eq!` macro call
166   --> $DIR/eq_op.rs:94:20
167    |
168 LL |         assert_eq!(a, a);
169    |                    ^^^^
170 ...
171 LL |     assert_in_macro_def!();
172    |     ----------------------- in this macro invocation
173    |
174    = note: `#[deny(clippy::eq_op)]` on by default
175    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
176
177 error: identical args used in this `assert_ne!` macro call
178   --> $DIR/eq_op.rs:95:20
179    |
180 LL |         assert_ne!(a, a);
181    |                    ^^^^
182 ...
183 LL |     assert_in_macro_def!();
184    |     ----------------------- in this macro invocation
185    |
186    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
187
188 error: identical args used in this `assert_eq!` macro call
189   --> $DIR/eq_op.rs:110:16
190    |
191 LL |     assert_eq!(a, a);
192    |                ^^^^
193
194 error: identical args used in this `assert_eq!` macro call
195   --> $DIR/eq_op.rs:111:16
196    |
197 LL |     assert_eq!(a + 1, a + 1);
198    |                ^^^^^^^^^^^^
199
200 error: identical args used in this `assert_ne!` macro call
201   --> $DIR/eq_op.rs:118:16
202    |
203 LL |     assert_ne!(a, a);
204    |                ^^^^
205
206 error: identical args used in this `assert_ne!` macro call
207   --> $DIR/eq_op.rs:119:16
208    |
209 LL |     assert_ne!(a + 1, a + 1);
210    |                ^^^^^^^^^^^^
211
212 error: identical args used in this `debug_assert_eq!` macro call
213   --> $DIR/eq_op.rs:96:26
214    |
215 LL |         debug_assert_eq!(a, a);
216    |                          ^^^^
217 ...
218 LL |     assert_in_macro_def!();
219    |     ----------------------- in this macro invocation
220    |
221    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
222
223 error: identical args used in this `debug_assert_ne!` macro call
224   --> $DIR/eq_op.rs:97:26
225    |
226 LL |         debug_assert_ne!(a, a);
227    |                          ^^^^
228 ...
229 LL |     assert_in_macro_def!();
230    |     ----------------------- in this macro invocation
231    |
232    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
233
234 error: identical args used in this `debug_assert_eq!` macro call
235   --> $DIR/eq_op.rs:126:22
236    |
237 LL |     debug_assert_eq!(a, a);
238    |                      ^^^^
239
240 error: identical args used in this `debug_assert_eq!` macro call
241   --> $DIR/eq_op.rs:127:22
242    |
243 LL |     debug_assert_eq!(a + 1, a + 1);
244    |                      ^^^^^^^^^^^^
245
246 error: identical args used in this `debug_assert_ne!` macro call
247   --> $DIR/eq_op.rs:134:22
248    |
249 LL |     debug_assert_ne!(a, a);
250    |                      ^^^^
251
252 error: identical args used in this `debug_assert_ne!` macro call
253   --> $DIR/eq_op.rs:135:22
254    |
255 LL |     debug_assert_ne!(a + 1, a + 1);
256    |                      ^^^^^^^^^^^^
257
258 error: aborting due to 39 previous errors
259