2018-10-08 20:36:50 +01:00
|
|
|
error: unused return value of `foo` that must be used
|
2019-12-11 09:51:28 -05:00
|
|
|
--> $DIR/must_use-unit.rs:13:5
|
2018-10-08 21:08:01 +01:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | foo();
|
2022-08-16 07:46:33 -07:00
|
|
|
| ^^^^^
|
2018-10-08 21:08:01 +01:00
|
|
|
|
|
2020-01-22 23:57:38 +00:00
|
|
|
note: the lint level is defined here
|
2019-12-11 09:51:28 -05:00
|
|
|
--> $DIR/must_use-unit.rs:2:9
|
2018-10-08 21:08:01 +01:00
|
|
|
|
|
|
|
|
LL | #![deny(unused_must_use)]
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2023-03-11 18:28:05 +13:00
|
|
|
help: use `let _ = ...` to ignore the resulting value
|
|
|
|
|
|
|
|
|
LL | let _ = foo();
|
|
|
|
| +++++++
|
2018-10-08 21:08:01 +01:00
|
|
|
|
2018-10-08 20:36:50 +01:00
|
|
|
error: unused return value of `bar` that must be used
|
2019-12-11 09:51:28 -05:00
|
|
|
--> $DIR/must_use-unit.rs:15:5
|
2018-10-08 21:08:01 +01:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | bar();
|
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 _ = bar();
|
|
|
|
| +++++++
|
2018-10-08 21:08:01 +01:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|