2015-01-03 09:45:00 -06:00
|
|
|
struct X<F> where F: FnOnce() + 'static + Send {
|
|
|
|
field: F,
|
2013-06-13 18:38:36 -05:00
|
|
|
}
|
|
|
|
|
2015-01-03 09:45:00 -06:00
|
|
|
fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
2018-06-09 18:53:36 -05:00
|
|
|
//~^ ERROR `F` cannot be sent between threads safely
|
2015-01-03 09:45:00 -06:00
|
|
|
return X { field: blk };
|
2013-06-13 18:38:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|