]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr
Rollup merge of #89235 - yaahc:junit-formatting, r=kennytm
[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 | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
5    |                      ^^^^ `F` cannot be sent between threads safely
6    |
7 note: required by a bound in `X`
8   --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:43
9    |
10 LL | struct X<F> where F: FnOnce() + 'static + Send {
11    |                                           ^^^^ required by this bound in `X`
12 help: consider further restricting this bound
13    |
14 LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static + std::marker::Send {
15    |                                                       +++++++++++++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.