rust/tests/pass/concurrency/mutex_leak.rs
2022-07-08 16:08:32 +00: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());
}