struct X where F: FnOnce() + 'static + Send { field: F, } fn foo(blk: F) -> X where F: FnOnce() + 'static { //~^ ERROR `F` cannot be sent between threads safely return X { field: blk }; //~^ ERROR `F` cannot be sent between threads safely } fn main() { }