about summary refs log tree commit diff
path: root/tests/ui/lint/unused/must-use-macros.stderr
blob: 2ad174e10b501851eb6f4e4a40992c8770e5a843 (plain)
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
48
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