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