blob: 84aaa5f85e4d93528db5f1e6682747e80f05cc88 [file] [log] [blame] [edit]
struct X<F> where F: FnOnce() + 'static + Send {
field: F,
}
fn foo<F>(blk: F) -> X<F> 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() {
}