]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[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:5:22
3    |
4 LL | struct X<F> where F: FnOnce() + 'static + Send {
5    |                                           ---- required by this bound in `X`
6 ...
7 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
8    |                      ^^^^ `F` cannot be sent between threads safely
9    |
10 help: consider further restricting this bound
11    |
12 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
13    |                                                       ^^^^^^^^^^^^^^^^^^^
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0277`.