2018-08-08 07:28:26 -05:00
|
|
|
error[E0277]: `F` cannot be sent between threads safely
|
2020-01-18 16:57:56 -06:00
|
|
|
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:22
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2020-01-18 16:57:56 -06:00
|
|
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
|
|
|
| ---------------------------------------------- required by `X`
|
2019-08-24 16:44:43 -05:00
|
|
|
...
|
2020-01-18 16:57:56 -06:00
|
|
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
2019-12-26 06:43:33 -06:00
|
|
|
| ^^^^ `F` cannot be sent between threads safely
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
= help: the trait `std::marker::Send` is not implemented for `F`
|
2019-12-26 06:43:33 -06:00
|
|
|
help: consider further restricting this bound with `+ std::marker::Send`
|
|
|
|
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:33
|
|
|
|
|
|
|
|
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|