blob: fb58af0a42f81422097a8e7848caf14e3a785c3a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
error: non-binding let on a synchronization lock
--> $DIR/let_underscore_lock.rs:6:9
|
LL | let _ = data.lock().unwrap();
| ^ ^^^^^^^^^^^^^^^^^^^^ this binding will immediately drop the value assigned to it
| |
| this lock is not assigned to a binding and is immediately dropped
|
= note: `#[deny(let_underscore_lock)]` on by default
help: consider binding to an unused variable to avoid immediately dropping the value
|
LL | let _unused = data.lock().unwrap();
| ~~~~~~~
help: consider immediately dropping the value
|
LL | drop(data.lock().unwrap());
| ~~~~~ +
error: aborting due to previous error
|