]>
Commit | Line | Data |
---|---|---|
94222f64 | 1 | warning: unused comparison that must be used |
487cf647 | 2 | --> $DIR/must-use-ops.rs:18:5 |
94222f64 XL |
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 | |
487cf647 | 18 | --> $DIR/must-use-ops.rs:19:5 |
94222f64 XL |
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 | |
487cf647 | 29 | --> $DIR/must-use-ops.rs:20:5 |
94222f64 XL |
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 | |
487cf647 | 40 | --> $DIR/must-use-ops.rs:21:5 |
94222f64 XL |
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 | |
487cf647 | 51 | --> $DIR/must-use-ops.rs:22:5 |
94222f64 XL |
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 | |
487cf647 | 62 | --> $DIR/must-use-ops.rs:23:5 |
94222f64 XL |
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 | |
487cf647 | 73 | --> $DIR/must-use-ops.rs:26:5 |
94222f64 XL |
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 | |
487cf647 | 84 | --> $DIR/must-use-ops.rs:27:5 |
94222f64 XL |
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 | |
487cf647 | 95 | --> $DIR/must-use-ops.rs:28:5 |
94222f64 XL |
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 | |
487cf647 | 106 | --> $DIR/must-use-ops.rs:29:5 |
94222f64 XL |
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 | |
487cf647 | 117 | --> $DIR/must-use-ops.rs:30:5 |
94222f64 XL |
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 | |
487cf647 | 128 | --> $DIR/must-use-ops.rs:33:5 |
94222f64 XL |
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 | |
487cf647 | 139 | --> $DIR/must-use-ops.rs:34:5 |
94222f64 XL |
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 | |
487cf647 | 150 | --> $DIR/must-use-ops.rs:37:5 |
94222f64 XL |
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 | |
487cf647 | 161 | --> $DIR/must-use-ops.rs:38:5 |
94222f64 XL |
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 | |
487cf647 | 172 | --> $DIR/must-use-ops.rs:39:5 |
94222f64 XL |
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 | |
487cf647 | 183 | --> $DIR/must-use-ops.rs:40:5 |
94222f64 XL |
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 | |
487cf647 | 194 | --> $DIR/must-use-ops.rs:41:5 |
94222f64 XL |
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 | |
487cf647 | 205 | --> $DIR/must-use-ops.rs:44:5 |
94222f64 XL |
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 | |
487cf647 | 216 | --> $DIR/must-use-ops.rs:45:5 |
94222f64 XL |
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 | |
487cf647 | 227 | --> $DIR/must-use-ops.rs:46:5 |
94222f64 XL |
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 |