]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/libc_pthread_rwlock_destroy_read_locked.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / libc_pthread_rwlock_destroy_read_locked.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         assert_eq!(libc::pthread_rwlock_rdlock(rw.get()), 0);
11         libc::pthread_rwlock_destroy(rw.get()); //~ ERROR destroyed a locked rwlock
12     }
13 }