2018-05-04 04:01:57 +00:00
|
|
|
warning: unused return value of `need_to_use_this_value` which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:60:5
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | need_to_use_this_value(); //~ WARN unused return value
|
2017-09-15 23:26:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:13:9
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | #![warn(unused_must_use)]
|
2017-09-15 23:26:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-05-04 04:01:57 +00:00
|
|
|
= note: it's important
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_method_value` which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:65:5
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m.need_to_use_this_method_value(); //~ WARN unused return value
|
2017-09-15 23:26:34 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-05-04 04:01:57 +00:00
|
|
|
warning: unused return value of `EvenNature::is_even` which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:66:5
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m.is_even(); // trait method!
|
2017-09-15 23:26:34 +00:00
|
|
|
| ^^^^^^^^^^^^
|
2018-05-04 04:01:57 +00:00
|
|
|
|
|
|
|
|
= note: no side effects
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:72:5
|
2017-09-15 23:26:34 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | 2.eq(&3); //~ WARN unused return value
|
2017-09-15 23:26:34 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2017-09-23 17:11:39 +00:00
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:73:5
|
2017-09-23 17:11:39 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m.eq(&n); //~ WARN unused return value
|
2017-09-23 17:11:39 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
warning: unused comparison which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:76:5
|
2017-09-23 17:11:39 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | 2 == 3; //~ WARN unused comparison
|
2017-09-23 17:11:39 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|
2017-09-22 22:45:47 +00:00
|
|
|
warning: unused comparison which must be used
|
2018-03-11 00:23:28 +00:00
|
|
|
--> $DIR/fn_must_use.rs:77:5
|
2017-09-22 22:45:47 +00:00
|
|
|
|
|
2018-02-23 00:42:32 +00:00
|
|
|
LL | m == n; //~ WARN unused comparison
|
2017-09-22 22:45:47 +00:00
|
|
|
| ^^^^^^
|
|
|
|
|