I love the new let_underscore_lock
lint that gives errors like
error: non-binding let on a synchronization lock
--> tests/common.rs:426:13
|
426 | let _ = lock.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
|
426 | let _unused = lock.lock().unwrap();
| ~~~~~~~
help: consider immediately dropping the value
|
426 | drop(lock.lock().unwrap());
| ~~~~~ +
and am wondering if there is any way to get this kind of error for my own guard types?