2018-08-08 07:28:26 -05:00
|
|
|
error[E0277]: `F` cannot be sent between threads safely
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | / fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | | return X { field: blk };
|
|
|
|
LL | | }
|
|
|
|
| |_^ `F` cannot be sent between threads safely
|
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Send` is not implemented for `F`
|
|
|
|
= help: consider adding a `where F: std::marker::Send` bound
|
|
|
|
note: required by `X`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:1
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|