fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
834 B19 linesraw
1error[E0277]: `F` cannot be sent between threads safely
2  --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:22
3   |
4LL | struct X<F> where F: FnOnce() + 'static + Send {
5   | ---------------------------------------------- required by `X`
6...
7LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
8   |                      ^^^^ `F` cannot be sent between threads safely
9   |
10   = help: the trait `std::marker::Send` is not implemented for `F`
11help: consider further restricting this bound with `+ std::marker::Send`
12  --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:33
13   |
14LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
15   |                                 ^^^^^^^^^^^^^^^^^^^^^
16
17error: aborting due to previous error
18
19For more information about this error, try `rustc --explain E0277`.