]> git.lizzy.rs Git - rust.git/blob - src/test/ui/fn_must_use.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / 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(); //~ WARN unused return value
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: lint level defined here
8   --> $DIR/fn_must_use.rs:3:9
9    |
10 LL | #![warn(unused_must_use)]
11    |         ^^^^^^^^^^^^^^^
12    = note: it's important
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(); //~ WARN unused return 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); //~ WARN unused return value
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); //~ WARN unused return value
44    |     ^^^^^^^^^
45
46 warning: unused comparison that must be used
47   --> $DIR/fn_must_use.rs:74:5
48    |
49 LL |     2 == 3; //~ WARN unused comparison
50    |     ^^^^^^
51
52 warning: unused comparison that must be used
53   --> $DIR/fn_must_use.rs:75:5
54    |
55 LL |     m == n; //~ WARN unused comparison
56    |     ^^^^^^
57