]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/fn_must_use.stderr
Auto merge of #106884 - clubby789:fieldless-enum-debug, r=michaelwoerister
[rust.git] / tests / ui / lint / fn_must_use.stderr
1 warning: unused return value of `need_to_use_this_value` that must be used
2   --> $DIR/fn_must_use.rs:55:5
3    |
4 LL |     need_to_use_this_value();
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: it's important
8 note: the lint level is defined here
9   --> $DIR/fn_must_use.rs:3:9
10    |
11 LL | #![warn(unused_must_use)]
12    |         ^^^^^^^^^^^^^^^
13
14 warning: unused return value of `MyStruct::need_to_use_this_method_value` that must be used
15   --> $DIR/fn_must_use.rs:60:5
16    |
17 LL |     m.need_to_use_this_method_value();
18    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
20 warning: unused return value of `EvenNature::is_even` that must be used
21   --> $DIR/fn_must_use.rs:61:5
22    |
23 LL |     m.is_even(); // trait method!
24    |     ^^^^^^^^^^^
25    |
26    = note: no side effects
27
28 warning: unused return value of `MyStruct::need_to_use_this_associated_function_value` that must be used
29   --> $DIR/fn_must_use.rs:64:5
30    |
31 LL |     MyStruct::need_to_use_this_associated_function_value();
32    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33
34 warning: unused return value of `std::cmp::PartialEq::eq` that must be used
35   --> $DIR/fn_must_use.rs:70:5
36    |
37 LL |     2.eq(&3);
38    |     ^^^^^^^^
39
40 warning: unused return value of `std::cmp::PartialEq::eq` that must be used
41   --> $DIR/fn_must_use.rs:71:5
42    |
43 LL |     m.eq(&n);
44    |     ^^^^^^^^
45
46 warning: unused comparison that must be used
47   --> $DIR/fn_must_use.rs:74:5
48    |
49 LL |     2 == 3;
50    |     ^^^^^^ the comparison produces a value
51    |
52 help: use `let _ = ...` to ignore the resulting value
53    |
54 LL |     let _ = 2 == 3;
55    |     +++++++
56
57 warning: unused comparison that must be used
58   --> $DIR/fn_must_use.rs:75:5
59    |
60 LL |     m == n;
61    |     ^^^^^^ the comparison produces a value
62    |
63 help: use `let _ = ...` to ignore the resulting value
64    |
65 LL |     let _ = m == n;
66    |     +++++++
67
68 warning: 8 warnings emitted
69