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
|
|
|
|
|
2019-08-24 16:44:43 -05:00
|
|
|
LL | struct X<F> where F: FnOnce() + 'static + Send {
|
|
|
|
| ---------------------------------------------- required by `X`
|
|
|
|
...
|
2019-10-08 13:03:35 -05:00
|
|
|
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
|
|
|
|
| ^ - help: consider further restricting type parameter `F`: `, F: std::marker::Send`
|
|
|
|
| _|
|
|
|
|
| |
|
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`
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|