]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / closures / closure-bounds-cant-promote-superkind-in-struct.stderr
1 error[E0277]: `F` cannot be sent between threads safely
2   --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:15:1
3    |
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 };
7 LL | | }
8    | |_^ `F` cannot be sent between threads safely
9    |
10    = help: the trait `std::marker::Send` is not implemented for `F`
11    = help: consider adding a `where F: std::marker::Send` bound
12 note: required by `X`
13   --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:11:1
14    |
15 LL | struct X<F> where F: FnOnce() + 'static + Send {
16    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0277`.