// run-pass #![allow(unused_variables)] #![feature(negative_impls)] pub struct WaitToken; impl !Send for WaitToken {} pub struct Test(#[allow(unused_tuple_struct_fields)] T); unsafe impl Send for Test {} pub fn spawn(_: F) -> () where F: FnOnce(), F: Send + 'static {} fn main() { let wt = Test(WaitToken); spawn(move || { let x = wt; println!("Hello, World!"); }); }