blob: f88a1df55e066471b02f90e1c5a2317747c5faa8 (
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 1 previous error
|