about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail-dep/concurrency/windows_thread_invalid.rs
blob: 2e0729c9b49651d2e2081b142556cb9e50a572bc (plain)
1
2
3
4
5
6
7
8
9
//! Ensure we error if thread functions are called with invalid handles
//@only-target: windows # testing Windows API

use windows_sys::Win32::System::Threading::GetThreadId;

fn main() {
    let _tid = unsafe { GetThreadId(std::ptr::dangling_mut()) };
    //~^ ERROR: invalid handle
}