mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-18 02:38:28 +00:00
634e79c655
I think the detection of parking_lot's mutex and rwlock is valuable, so submit this pr, please help judge and review, thank you. Make let_underscore_lock support parking_lot. changelog: Make let_underscore_lock support parking_lot
83 lines
2.7 KiB
Text
83 lines
2.7 KiB
Text
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:9:5
|
|
|
|
|
LL | let _ = m.lock();
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::let-underscore-lock` implied by `-D warnings`
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:10:5
|
|
|
|
|
LL | let _ = rw.read();
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:11:5
|
|
|
|
|
LL | let _ = rw.write();
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:12:5
|
|
|
|
|
LL | let _ = m.try_lock();
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:13:5
|
|
|
|
|
LL | let _ = rw.try_read();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:14:5
|
|
|
|
|
LL | let _ = rw.try_write();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:19:5
|
|
|
|
|
LL | let _ = p_m.lock();
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:22:5
|
|
|
|
|
LL | let _ = p_m1.lock();
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:25:5
|
|
|
|
|
LL | let _ = p_rw.read();
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: non-binding let on a synchronization lock
|
|
--> $DIR/let_underscore_lock.rs:26:5
|
|
|
|
|
LL | let _ = p_rw.write();
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: consider using an underscore-prefixed named binding or dropping explicitly with `std::mem::drop`
|
|
|
|
error: aborting due to 10 previous errors
|
|
|