@@ -2,133 +2,174 @@ warning: unused comparison that must be used
22 --> $DIR/must-use-ops.rs:12:5
33 |
44LL | val == 1;
5- | ^^^^^^^^
5+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val == 1`
66 |
77note: the lint level is defined here
88 --> $DIR/must-use-ops.rs:5:9
99 |
1010LL | #![warn(unused_must_use)]
1111 | ^^^^^^^^^^^^^^^
12+ = note: the comparison produces a value
1213
1314warning: unused comparison that must be used
1415 --> $DIR/must-use-ops.rs:13:5
1516 |
1617LL | val < 1;
17- | ^^^^^^^
18+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val < 1`
19+ |
20+ = note: the comparison produces a value
1821
1922warning: unused comparison that must be used
2023 --> $DIR/must-use-ops.rs:14:5
2124 |
2225LL | val <= 1;
23- | ^^^^^^^^
26+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val <= 1`
27+ |
28+ = note: the comparison produces a value
2429
2530warning: unused comparison that must be used
2631 --> $DIR/must-use-ops.rs:15:5
2732 |
2833LL | val != 1;
29- | ^^^^^^^^
34+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val != 1`
35+ |
36+ = note: the comparison produces a value
3037
3138warning: unused comparison that must be used
3239 --> $DIR/must-use-ops.rs:16:5
3340 |
3441LL | val >= 1;
35- | ^^^^^^^^
42+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val >= 1`
43+ |
44+ = note: the comparison produces a value
3645
3746warning: unused comparison that must be used
3847 --> $DIR/must-use-ops.rs:17:5
3948 |
4049LL | val > 1;
41- | ^^^^^^^
50+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val > 1`
51+ |
52+ = note: the comparison produces a value
4253
4354warning: unused arithmetic operation that must be used
4455 --> $DIR/must-use-ops.rs:20:5
4556 |
4657LL | val + 2;
47- | ^^^^^^^
58+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val + 2`
59+ |
60+ = note: the arithmetic operation produces a value
4861
4962warning: unused arithmetic operation that must be used
5063 --> $DIR/must-use-ops.rs:21:5
5164 |
5265LL | val - 2;
53- | ^^^^^^^
66+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val - 2`
67+ |
68+ = note: the arithmetic operation produces a value
5469
5570warning: unused arithmetic operation that must be used
5671 --> $DIR/must-use-ops.rs:22:5
5772 |
5873LL | val / 2;
59- | ^^^^^^^
74+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val / 2`
75+ |
76+ = note: the arithmetic operation produces a value
6077
6178warning: unused arithmetic operation that must be used
6279 --> $DIR/must-use-ops.rs:23:5
6380 |
6481LL | val * 2;
65- | ^^^^^^^
82+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val * 2`
83+ |
84+ = note: the arithmetic operation produces a value
6685
6786warning: unused arithmetic operation that must be used
6887 --> $DIR/must-use-ops.rs:24:5
6988 |
7089LL | val % 2;
71- | ^^^^^^^
90+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val % 2`
91+ |
92+ = note: the arithmetic operation produces a value
7293
7394warning: unused logical operation that must be used
7495 --> $DIR/must-use-ops.rs:27:5
7596 |
7697LL | true && true;
77- | ^^^^^^^^^^^^
98+ | ^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = true && true`
99+ |
100+ = note: the logical operation produces a value
78101
79102warning: unused logical operation that must be used
80103 --> $DIR/must-use-ops.rs:28:5
81104 |
82105LL | false || true;
83- | ^^^^^^^^^^^^^
106+ | ^^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = false || true`
107+ |
108+ = note: the logical operation produces a value
84109
85110warning: unused bitwise operation that must be used
86111 --> $DIR/must-use-ops.rs:31:5
87112 |
88113LL | 5 ^ val;
89- | ^^^^^^^
114+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 ^ val`
115+ |
116+ = note: the bitwise operation produces a value
90117
91118warning: unused bitwise operation that must be used
92119 --> $DIR/must-use-ops.rs:32:5
93120 |
94121LL | 5 & val;
95- | ^^^^^^^
122+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 & val`
123+ |
124+ = note: the bitwise operation produces a value
96125
97126warning: unused bitwise operation that must be used
98127 --> $DIR/must-use-ops.rs:33:5
99128 |
100129LL | 5 | val;
101- | ^^^^^^^
130+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 | val`
131+ |
132+ = note: the bitwise operation produces a value
102133
103134warning: unused bitwise operation that must be used
104135 --> $DIR/must-use-ops.rs:34:5
105136 |
106137LL | 5 << val;
107- | ^^^^^^^^
138+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 << val`
139+ |
140+ = note: the bitwise operation produces a value
108141
109142warning: unused bitwise operation that must be used
110143 --> $DIR/must-use-ops.rs:35:5
111144 |
112145LL | 5 >> val;
113- | ^^^^^^^^
146+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 >> val`
147+ |
148+ = note: the bitwise operation produces a value
114149
115150warning: unused unary operation that must be used
116151 --> $DIR/must-use-ops.rs:38:5
117152 |
118153LL | !val;
119- | ^^^^
154+ | ^^^^ help: use `let _ = ...` to ignore it: `let _ = !val`
155+ |
156+ = note: the unary operation produces a value
120157
121158warning: unused unary operation that must be used
122159 --> $DIR/must-use-ops.rs:39:5
123160 |
124161LL | -val;
125- | ^^^^
162+ | ^^^^ help: use `let _ = ...` to ignore it: `let _ = -val`
163+ |
164+ = note: the unary operation produces a value
126165
127166warning: unused unary operation that must be used
128167 --> $DIR/must-use-ops.rs:40:5
129168 |
130169LL | *val_pointer;
131- | ^^^^^^^^^^^^
170+ | ^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = *val_pointer`
171+ |
172+ = note: the unary operation produces a value
132173
133174warning: 21 warnings emitted
134175
0 commit comments