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