@@ -2,133 +2,174 @@ warning: unused comparison that must be used
2
2
--> $DIR/must-use-ops.rs:12:5
3
3
|
4
4
LL | val == 1;
5
- | ^^^^^^^^
5
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val == 1`
6
6
|
7
7
note: the lint level is defined here
8
8
--> $DIR/must-use-ops.rs:5:9
9
9
|
10
10
LL | #![warn(unused_must_use)]
11
11
| ^^^^^^^^^^^^^^^
12
+ = note: the comparison produces a value
12
13
13
14
warning: unused comparison that must be used
14
15
--> $DIR/must-use-ops.rs:13:5
15
16
|
16
17
LL | val < 1;
17
- | ^^^^^^^
18
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val < 1`
19
+ |
20
+ = note: the comparison produces a value
18
21
19
22
warning: unused comparison that must be used
20
23
--> $DIR/must-use-ops.rs:14:5
21
24
|
22
25
LL | val <= 1;
23
- | ^^^^^^^^
26
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val <= 1`
27
+ |
28
+ = note: the comparison produces a value
24
29
25
30
warning: unused comparison that must be used
26
31
--> $DIR/must-use-ops.rs:15:5
27
32
|
28
33
LL | val != 1;
29
- | ^^^^^^^^
34
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val != 1`
35
+ |
36
+ = note: the comparison produces a value
30
37
31
38
warning: unused comparison that must be used
32
39
--> $DIR/must-use-ops.rs:16:5
33
40
|
34
41
LL | val >= 1;
35
- | ^^^^^^^^
42
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val >= 1`
43
+ |
44
+ = note: the comparison produces a value
36
45
37
46
warning: unused comparison that must be used
38
47
--> $DIR/must-use-ops.rs:17:5
39
48
|
40
49
LL | val > 1;
41
- | ^^^^^^^
50
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val > 1`
51
+ |
52
+ = note: the comparison produces a value
42
53
43
54
warning: unused arithmetic operation that must be used
44
55
--> $DIR/must-use-ops.rs:20:5
45
56
|
46
57
LL | val + 2;
47
- | ^^^^^^^
58
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val + 2`
59
+ |
60
+ = note: the arithmetic operation produces a value
48
61
49
62
warning: unused arithmetic operation that must be used
50
63
--> $DIR/must-use-ops.rs:21:5
51
64
|
52
65
LL | val - 2;
53
- | ^^^^^^^
66
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val - 2`
67
+ |
68
+ = note: the arithmetic operation produces a value
54
69
55
70
warning: unused arithmetic operation that must be used
56
71
--> $DIR/must-use-ops.rs:22:5
57
72
|
58
73
LL | val / 2;
59
- | ^^^^^^^
74
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val / 2`
75
+ |
76
+ = note: the arithmetic operation produces a value
60
77
61
78
warning: unused arithmetic operation that must be used
62
79
--> $DIR/must-use-ops.rs:23:5
63
80
|
64
81
LL | val * 2;
65
- | ^^^^^^^
82
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val * 2`
83
+ |
84
+ = note: the arithmetic operation produces a value
66
85
67
86
warning: unused arithmetic operation that must be used
68
87
--> $DIR/must-use-ops.rs:24:5
69
88
|
70
89
LL | val % 2;
71
- | ^^^^^^^
90
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = val % 2`
91
+ |
92
+ = note: the arithmetic operation produces a value
72
93
73
94
warning: unused logical operation that must be used
74
95
--> $DIR/must-use-ops.rs:27:5
75
96
|
76
97
LL | true && true;
77
- | ^^^^^^^^^^^^
98
+ | ^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = true && true`
99
+ |
100
+ = note: the logical operation produces a value
78
101
79
102
warning: unused logical operation that must be used
80
103
--> $DIR/must-use-ops.rs:28:5
81
104
|
82
105
LL | false || true;
83
- | ^^^^^^^^^^^^^
106
+ | ^^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = false || true`
107
+ |
108
+ = note: the logical operation produces a value
84
109
85
110
warning: unused bitwise operation that must be used
86
111
--> $DIR/must-use-ops.rs:31:5
87
112
|
88
113
LL | 5 ^ val;
89
- | ^^^^^^^
114
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 ^ val`
115
+ |
116
+ = note: the bitwise operation produces a value
90
117
91
118
warning: unused bitwise operation that must be used
92
119
--> $DIR/must-use-ops.rs:32:5
93
120
|
94
121
LL | 5 & val;
95
- | ^^^^^^^
122
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 & val`
123
+ |
124
+ = note: the bitwise operation produces a value
96
125
97
126
warning: unused bitwise operation that must be used
98
127
--> $DIR/must-use-ops.rs:33:5
99
128
|
100
129
LL | 5 | val;
101
- | ^^^^^^^
130
+ | ^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 | val`
131
+ |
132
+ = note: the bitwise operation produces a value
102
133
103
134
warning: unused bitwise operation that must be used
104
135
--> $DIR/must-use-ops.rs:34:5
105
136
|
106
137
LL | 5 << val;
107
- | ^^^^^^^^
138
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 << val`
139
+ |
140
+ = note: the bitwise operation produces a value
108
141
109
142
warning: unused bitwise operation that must be used
110
143
--> $DIR/must-use-ops.rs:35:5
111
144
|
112
145
LL | 5 >> val;
113
- | ^^^^^^^^
146
+ | ^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = 5 >> val`
147
+ |
148
+ = note: the bitwise operation produces a value
114
149
115
150
warning: unused unary operation that must be used
116
151
--> $DIR/must-use-ops.rs:38:5
117
152
|
118
153
LL | !val;
119
- | ^^^^
154
+ | ^^^^ help: use `let _ = ...` to ignore it: `let _ = !val`
155
+ |
156
+ = note: the unary operation produces a value
120
157
121
158
warning: unused unary operation that must be used
122
159
--> $DIR/must-use-ops.rs:39:5
123
160
|
124
161
LL | -val;
125
- | ^^^^
162
+ | ^^^^ help: use `let _ = ...` to ignore it: `let _ = -val`
163
+ |
164
+ = note: the unary operation produces a value
126
165
127
166
warning: unused unary operation that must be used
128
167
--> $DIR/must-use-ops.rs:40:5
129
168
|
130
169
LL | *val_pointer;
131
- | ^^^^^^^^^^^^
170
+ | ^^^^^^^^^^^^ help: use `let _ = ...` to ignore it: `let _ = *val_pointer`
171
+ |
172
+ = note: the unary operation produces a value
132
173
133
174
warning: 21 warnings emitted
134
175
0 commit comments