2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `need_to_use_this_value` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:55:5
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | need_to_use_this_value();
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2022-09-18 19:55:36 +04:00
|
|
|
= note: it's important
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:3:9
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | #![warn(unused_must_use)]
|
2017-09-15 16:26:34 -07:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = need_to_use_this_value();
|
|
|
|
| +++++++
|
2017-09-15 16:26:34 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_method_value` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:60:5
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | m.need_to_use_this_method_value();
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = m.need_to_use_this_method_value();
|
|
|
|
| +++++++
|
2017-09-15 16:26:34 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `EvenNature::is_even` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:61:5
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | m.is_even(); // trait method!
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^^^^
|
2018-05-03 21:01:57 -07:00
|
|
|
|
|
|
|
|
= note: no side effects
|
2023-03-11 18:28:05 +13:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = m.is_even(); // trait method!
|
|
|
|
| +++++++
|
2017-09-15 16:26:34 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `MyStruct::need_to_use_this_associated_function_value` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:64:5
|
2018-10-11 23:10:37 -07:00
|
|
|
|
|
|
|
|
LL | MyStruct::need_to_use_this_associated_function_value();
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = MyStruct::need_to_use_this_associated_function_value();
|
|
|
|
| +++++++
|
2018-10-11 23:10:37 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:70:5
|
2017-09-15 16:26:34 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | 2.eq(&3);
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = 2.eq(&3);
|
|
|
|
| +++++++
|
2017-09-15 16:26:34 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused return value of `std::cmp::PartialEq::eq` that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:71:5
|
2017-09-23 10:11:39 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | m.eq(&n);
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = m.eq(&n);
|
|
|
|
| +++++++
|
2017-09-23 10:11:39 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused comparison that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:74:5
|
2017-09-23 10:11:39 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | 2 == 3;
|
2021-07-31 06:21:52 +09:00
|
|
|
| ^^^^^^ the comparison produces a value
|
2021-07-30 05:35:03 +09:00
|
|
|
|
|
2021-07-31 06:21:52 +09:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = 2 == 3;
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++++++
|
2017-09-23 10:11:39 -07:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
warning: unused comparison that must be used
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/fn_must_use.rs:75:5
|
2017-09-22 15:45:47 -07:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | m == n;
|
2021-07-31 06:21:52 +09:00
|
|
|
| ^^^^^^ the comparison produces a value
|
|
|
|
|
|
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
2021-07-30 05:35:03 +09:00
|
|
|
|
|
2021-07-31 06:21:52 +09:00
|
|
|
LL | let _ = m == n;
|
2021-06-21 19:07:19 -07:00
|
|
|
| +++++++
|
2017-09-22 15:45:47 -07:00
|
|
|
|
2020-03-11 16:30:09 +01:00
|
|
|
warning: 8 warnings emitted
|
|
|
|
|