]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/sync/libc_pthread_rwlock_unlock_unlocked.rs
organize compile-fail tests in folders
[rust.git] / tests / compile-fail / sync / libc_pthread_rwlock_unlock_unlocked.rs
1 // ignore-windows: No libc on Windows
2
3 #![feature(rustc_private)]
4
5 extern crate libc;
6
7 fn main() {
8     let rw = std::cell::UnsafeCell::new(libc::PTHREAD_RWLOCK_INITIALIZER);
9     unsafe {
10         libc::pthread_rwlock_unlock(rw.get()); //~ ERROR was not locked
11     }
12 }