rust/tests/fail/shims/sync/libc_pthread_rwlock_unlock_unlocked.rs
2022-08-17 22:02:20 -04:00

9 lines
227 B
Rust

//@ignore-target-windows: No libc on Windows
fn main() {
let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
unsafe {
libc::pthread_rwlock_unlock(rw.get()); //~ ERROR: was not locked
}
}