blob: 2e0729c9b49651d2e2081b142556cb9e50a572bc [file] [log] [blame]
//! 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
}