1 error[E0277]: `F` cannot be sent between threads safely
2 --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:15:1
4 LL | / fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
5 LL | | //~^ ERROR `F` cannot be sent between threads safely
6 LL | | return X { field: blk };
8 | |_^ `F` cannot be sent between threads safely
10 = help: the trait `std::marker::Send` is not implemented for `F`
11 = help: consider adding a `where F: std::marker::Send` bound
13 --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:11:1
15 LL | struct X<F> where F: FnOnce() + 'static + Send {
16 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 error: aborting due to previous error
20 For more information about this error, try `rustc --explain E0277`.