rust/tests/ui/lint/let_underscore/issue-119697-extra-let.stderr

38 lines
968 B
Plaintext

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