test for forgetting locked mutex
This commit is contained in:
parent
e5022bf48a
commit
7c025a8f0e
9
tests/pass/concurrency/mutex_leak.rs
Normal file
9
tests/pass/concurrency/mutex_leak.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// 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());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user