forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmust-use-macros.stderr
More file actions
48 lines (44 loc) · 1.4 KB
/
Copy pathmust-use-macros.stderr
File metadata and controls
48 lines (44 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
warning: unused comparison that must be used
--> $DIR/must-use-macros.rs:28:17
|
LL | $a == $b
| ^^^^^^^^ the comparison produces a value
...
LL | cmp!(a, b);
| ---------- in this macro invocation
|
note: the lint level is defined here
--> $DIR/must-use-macros.rs:9:9
|
LL | #![warn(unused_must_use)]
| ^^^^^^^^^^^^^^^
= note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = cmp!(a, b);
| +++++++
warning: unused comparison that must be used
--> $DIR/must-use-macros.rs:41:17
|
LL | $a == $b
| ^^^^^^^^ the comparison produces a value
...
LL | cmp!(1, 1);
| ---------- in this macro invocation
|
= note: this warning originates in the macro `cmp` (in Nightly builds, run with -Z macro-backtrace for more info)
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = cmp!(1, 1);
| +++++++
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
--> $DIR/must-use-macros.rs:56:9
|
LL | cmp!(1, 1);
| ^^^^^^^^^^
|
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = cmp!(1, 1);
| +++++++
warning: 3 warnings emitted