rust/tests/pass/concurrency/mutex_leak.rs
2022-06-25 16:01:00 -04:00

10 lines
209 B
Rust

// compile-flags: -Zmiri-ignore-leaks
use std::mem;
use std::sync::Mutex;
fn main() {
// Test for https://github.com/rust-lang/rust/issues/85434
let m = Mutex::new(5i32);
mem::forget(m.lock());
}