1 #![warn(clippy::let_underscore_lock)]
3 extern crate parking_lot;
6 use parking_lot::{lock_api::RawMutex, Mutex, RwLock};
8 let p_m: Mutex<()> = Mutex::const_new(RawMutex::INIT, ());
11 let p_m1 = Mutex::new(0);
14 let p_rw = RwLock::new(0);
18 // These shouldn't throw an error.
25 // shouldn't lint std locks as they were uplifted as rustc's `let_underscore_lock`
27 let m = std::sync::Mutex::new(());
28 let rw = std::sync::RwLock::new(());
34 let _ = rw.try_read();
35 let _ = rw.try_write();