mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-30 06:53:27 +00:00
13 lines
284 B
Rust
13 lines
284 B
Rust
#![warn(clippy::let_underscore_lock)]
|
|
|
|
fn main() {
|
|
let m = std::sync::Mutex::new(());
|
|
let rw = std::sync::RwLock::new(());
|
|
|
|
let _ = m.lock();
|
|
let _ = rw.read();
|
|
let _ = rw.write();
|
|
let _ = m.try_lock();
|
|
let _ = rw.try_read();
|
|
let _ = rw.try_write();
|
|
}
|