rust/tests/pass/concurrency/mutex_leak.rs

10 lines
209 B
Rust
Raw Normal View History

2022-06-25 14:45:45 -05:00
// 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());
}