fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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