]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/must-use-ops.stderr
Auto merge of #106989 - clubby789:is-zero-num, r=scottmcm
[rust.git] / tests / ui / lint / unused / must-use-ops.stderr
1 warning: unused comparison that must be used
2   --> $DIR/must-use-ops.rs:18:5
3    |
4 LL |     val == 1;
5    |     ^^^^^^^^ the comparison produces a value
6    |
7 note: the lint level is defined here
8   --> $DIR/must-use-ops.rs:5:9
9    |
10 LL | #![warn(unused_must_use)]
11    |         ^^^^^^^^^^^^^^^
12 help: use `let _ = ...` to ignore the resulting value
13    |
14 LL |     let _ = val == 1;
15    |     +++++++
16
17 warning: unused comparison that must be used
18   --> $DIR/must-use-ops.rs:19:5
19    |
20 LL |     val < 1;
21    |     ^^^^^^^ the comparison produces a value
22    |
23 help: use `let _ = ...` to ignore the resulting value
24    |
25 LL |     let _ = val < 1;
26    |     +++++++
27
28 warning: unused comparison that must be used
29   --> $DIR/must-use-ops.rs:20:5
30    |
31 LL |     val <= 1;
32    |     ^^^^^^^^ the comparison produces a value
33    |
34 help: use `let _ = ...` to ignore the resulting value
35    |
36 LL |     let _ = val <= 1;
37    |     +++++++
38
39 warning: unused comparison that must be used
40   --> $DIR/must-use-ops.rs:21:5
41    |
42 LL |     val != 1;
43    |     ^^^^^^^^ the comparison produces a value
44    |
45 help: use `let _ = ...` to ignore the resulting value
46    |
47 LL |     let _ = val != 1;
48    |     +++++++
49
50 warning: unused comparison that must be used
51   --> $DIR/must-use-ops.rs:22:5
52    |
53 LL |     val >= 1;
54    |     ^^^^^^^^ the comparison produces a value
55    |
56 help: use `let _ = ...` to ignore the resulting value
57    |
58 LL |     let _ = val >= 1;
59    |     +++++++
60
61 warning: unused comparison that must be used
62   --> $DIR/must-use-ops.rs:23:5
63    |
64 LL |     val > 1;
65    |     ^^^^^^^ the comparison produces a value
66    |
67 help: use `let _ = ...` to ignore the resulting value
68    |
69 LL |     let _ = val > 1;
70    |     +++++++
71
72 warning: unused arithmetic operation that must be used
73   --> $DIR/must-use-ops.rs:26:5
74    |
75 LL |     val + 2;
76    |     ^^^^^^^ the arithmetic operation produces a value
77    |
78 help: use `let _ = ...` to ignore the resulting value
79    |
80 LL |     let _ = val + 2;
81    |     +++++++
82
83 warning: unused arithmetic operation that must be used
84   --> $DIR/must-use-ops.rs:27:5
85    |
86 LL |     val - 2;
87    |     ^^^^^^^ the arithmetic operation produces a value
88    |
89 help: use `let _ = ...` to ignore the resulting value
90    |
91 LL |     let _ = val - 2;
92    |     +++++++
93
94 warning: unused arithmetic operation that must be used
95   --> $DIR/must-use-ops.rs:28:5
96    |
97 LL |     val / 2;
98    |     ^^^^^^^ the arithmetic operation produces a value
99    |
100 help: use `let _ = ...` to ignore the resulting value
101    |
102 LL |     let _ = val / 2;
103    |     +++++++
104
105 warning: unused arithmetic operation that must be used
106   --> $DIR/must-use-ops.rs:29:5
107    |
108 LL |     val * 2;
109    |     ^^^^^^^ the arithmetic operation produces a value
110    |
111 help: use `let _ = ...` to ignore the resulting value
112    |
113 LL |     let _ = val * 2;
114    |     +++++++
115
116 warning: unused arithmetic operation that must be used
117   --> $DIR/must-use-ops.rs:30:5
118    |
119 LL |     val % 2;
120    |     ^^^^^^^ the arithmetic operation produces a value
121    |
122 help: use `let _ = ...` to ignore the resulting value
123    |
124 LL |     let _ = val % 2;
125    |     +++++++
126
127 warning: unused logical operation that must be used
128   --> $DIR/must-use-ops.rs:33:5
129    |
130 LL |     true && true;
131    |     ^^^^^^^^^^^^ the logical operation produces a value
132    |
133 help: use `let _ = ...` to ignore the resulting value
134    |
135 LL |     let _ = true && true;
136    |     +++++++
137
138 warning: unused logical operation that must be used
139   --> $DIR/must-use-ops.rs:34:5
140    |
141 LL |     false || true;
142    |     ^^^^^^^^^^^^^ the logical operation produces a value
143    |
144 help: use `let _ = ...` to ignore the resulting value
145    |
146 LL |     let _ = false || true;
147    |     +++++++
148
149 warning: unused bitwise operation that must be used
150   --> $DIR/must-use-ops.rs:37:5
151    |
152 LL |     5 ^ val;
153    |     ^^^^^^^ the bitwise operation produces a value
154    |
155 help: use `let _ = ...` to ignore the resulting value
156    |
157 LL |     let _ = 5 ^ val;
158    |     +++++++
159
160 warning: unused bitwise operation that must be used
161   --> $DIR/must-use-ops.rs:38:5
162    |
163 LL |     5 & val;
164    |     ^^^^^^^ the bitwise operation produces a value
165    |
166 help: use `let _ = ...` to ignore the resulting value
167    |
168 LL |     let _ = 5 & val;
169    |     +++++++
170
171 warning: unused bitwise operation that must be used
172   --> $DIR/must-use-ops.rs:39:5
173    |
174 LL |     5 | val;
175    |     ^^^^^^^ the bitwise operation produces a value
176    |
177 help: use `let _ = ...` to ignore the resulting value
178    |
179 LL |     let _ = 5 | val;
180    |     +++++++
181
182 warning: unused bitwise operation that must be used
183   --> $DIR/must-use-ops.rs:40:5
184    |
185 LL |     5 << val;
186    |     ^^^^^^^^ the bitwise operation produces a value
187    |
188 help: use `let _ = ...` to ignore the resulting value
189    |
190 LL |     let _ = 5 << val;
191    |     +++++++
192
193 warning: unused bitwise operation that must be used
194   --> $DIR/must-use-ops.rs:41:5
195    |
196 LL |     5 >> val;
197    |     ^^^^^^^^ the bitwise operation produces a value
198    |
199 help: use `let _ = ...` to ignore the resulting value
200    |
201 LL |     let _ = 5 >> val;
202    |     +++++++
203
204 warning: unused unary operation that must be used
205   --> $DIR/must-use-ops.rs:44:5
206    |
207 LL |     !val;
208    |     ^^^^ the unary operation produces a value
209    |
210 help: use `let _ = ...` to ignore the resulting value
211    |
212 LL |     let _ = !val;
213    |     +++++++
214
215 warning: unused unary operation that must be used
216   --> $DIR/must-use-ops.rs:45:5
217    |
218 LL |     -val;
219    |     ^^^^ the unary operation produces a value
220    |
221 help: use `let _ = ...` to ignore the resulting value
222    |
223 LL |     let _ = -val;
224    |     +++++++
225
226 warning: unused unary operation that must be used
227   --> $DIR/must-use-ops.rs:46:5
228    |
229 LL |     *val_pointer;
230    |     ^^^^^^^^^^^^ the unary operation produces a value
231    |
232 help: use `let _ = ...` to ignore the resulting value
233    |
234 LL |     let _ = *val_pointer;
235    |     +++++++
236
237 warning: 21 warnings emitted
238