rust/tests/ui/lint/unused/unused-result.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.5 KiB
Plaintext
Raw Normal View History

error: unused `MustUse` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:21:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | foo::<MustUse>();
| ^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
|
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:2:25
2018-08-08 07:28:26 -05:00
|
LL | #![deny(unused_results, unused_must_use)]
| ^^^^^^^^^^^^^^^
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = foo::<MustUse>();
| +++++++
2018-08-08 07:28:26 -05:00
error: unused `MustUseMsg` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:22:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | foo::<MustUseMsg>();
| ^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
|
= note: some message
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = foo::<MustUseMsg>();
| +++++++
2018-08-08 07:28:26 -05:00
error: unused result of type `isize`
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:34:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | foo::<isize>();
2018-08-08 07:28:26 -05:00
| ^^^^^^^^^^^^^^^
|
2020-01-22 17:57:38 -06:00
note: the lint level is defined here
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:2:9
2018-08-08 07:28:26 -05:00
|
LL | #![deny(unused_results, unused_must_use)]
| ^^^^^^^^^^^^^^
error: unused `MustUse` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:35:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | foo::<MustUse>();
| ^^^^^^^^^^^^^^^^
|
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = foo::<MustUse>();
| +++++++
2018-08-08 07:28:26 -05:00
error: unused `MustUseMsg` that must be used
2018-12-25 09:56:47 -06:00
--> $DIR/unused-result.rs:36:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | foo::<MustUseMsg>();
| ^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
|
= note: some message
help: use `let _ = ...` to ignore the resulting value
|
LL | let _ = foo::<MustUseMsg>();
| +++++++
2018-08-08 07:28:26 -05:00
error: aborting due to 5 previous errors