rust/tests/ui/lint/let_underscore/issue-119696-err-on-fn.stderr

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

23 lines
583 B
Plaintext
Raw Normal View History

error: non-binding let on a type that implements `Drop`
--> $DIR/issue-119696-err-on-fn.rs:5:5
|
LL | let _ = foo();
| ^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/issue-119696-err-on-fn.rs:3:9
|
LL | #![deny(let_underscore_drop)]
| ^^^^^^^^^^^^^^^^^^^
help: consider binding to an unused variable to avoid immediately dropping the value
|
LL | let _unused = foo();
| ~~~~~~~
help: consider immediately dropping the value
|
LL | drop(foo());
| ~~~~~ +
error: aborting due to 1 previous error