rust/tests/fail/sync/libc_pthread_rwlock_unlock_unlocked.rs

11 lines
255 B
Rust
Raw Normal View History

//@ignore-target-windows: No libc on Windows
2020-04-05 14:55:57 -05:00
#![feature(rustc_private)]
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {
libc::pthread_rwlock_unlock(rw.get()); //~ ERROR: was not locked
2020-04-05 14:55:57 -05:00
}
}