2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `need_to_use_this_value` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:65:5
|
2017-09-15 18:26:34 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | need_to_use_this_value(); //~ WARN unused return value
|
2017-09-15 18:26:34 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: lint level defined here
|
2018-03-10 18:23:28 -06:00
|
|
|
--> $DIR/fn_must_use.rs:13:9
|
2017-09-15 18:26:34 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | #![warn(unused_must_use)]
|
2017-09-15 18:26:34 -05:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-05-03 23:01:57 -05:00
|
|
|
= note: it's important
|
2017-09-15 18:26:34 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_method_value` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:70:5
|
2017-09-15 18:26:34 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m.need_to_use_this_method_value(); //~ WARN unused return value
|
2017-09-15 18:26:34 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `EvenNature::is_even` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:71:5
|
2017-09-15 18:26:34 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m.is_even(); // trait method!
|
2017-09-15 18:26:34 -05:00
|
|
|
| ^^^^^^^^^^^^
|
2018-05-03 23:01:57 -05:00
|
|
|
|
|
|
|
|
= note: no side effects
|
2017-09-15 18:26:34 -05:00
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_associated_function_value` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:74:5
|
|
|
|
|
|
|
|
|
LL | MyStruct::need_to_use_this_associated_function_value();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:80:5
|
2017-09-15 18:26:34 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | 2.eq(&3); //~ WARN unused return value
|
2017-09-15 18:26:34 -05:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:81:5
|
2017-09-23 12:11:39 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m.eq(&n); //~ WARN unused return value
|
2017-09-23 12:11:39 -05:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:84:5
|
2017-09-23 12:11:39 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | 2 == 3; //~ WARN unused comparison
|
2017-09-23 12:11:39 -05:00
|
|
|
| ^^^^^^
|
|
|
|
|
2018-10-08 14:36:50 -05:00
|
|
|
warning: unused comparison that must be used
|
2018-10-12 01:10:37 -05:00
|
|
|
--> $DIR/fn_must_use.rs:85:5
|
2017-09-22 17:45:47 -05:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m == n; //~ WARN unused comparison
|
2017-09-22 17:45:47 -05:00
|
|
|
| ^^^^^^
|
|
|
|
|