]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[E0277]: `F` cannot be sent between threads safely |
0731742a | 2 | --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1 |
b7449926 | 3 | | |
e1599b0c XL |
4 | LL | struct X<F> where F: FnOnce() + 'static + Send { |
5 | | ---------------------------------------------- required by `X` | |
6 | ... | |
e74abb32 XL |
7 | LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static { |
8 | | ^ - help: consider further restricting type parameter `F`: `, F: std::marker::Send` | |
9 | | _| | |
10 | | | | |
532ac7d7 | 11 | LL | | |
b7449926 XL |
12 | LL | | return X { field: blk }; |
13 | LL | | } | |
14 | | |_^ `F` cannot be sent between threads safely | |
15 | | | |
16 | = help: the trait `std::marker::Send` is not implemented for `F` | |
b7449926 XL |
17 | |
18 | error: aborting due to previous error | |
19 | ||
20 | For more information about this error, try `rustc --explain E0277`. |