fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
762 B20 linesraw
1error[E0277]: `F` cannot be sent between threads safely
2  --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:5:1
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   |   ^                                                    - help: consider further restricting type parameter `F`: `, F: std::marker::Send`
9   |  _|
10   | |
11LL | |
12LL | |     return X { field: blk };
13LL | | }
14   | |_^ `F` cannot be sent between threads safely
15   |
16   = help: the trait `std::marker::Send` is not implemented for `F`
17
18error: aborting due to previous error
19
20For more information about this error, try `rustc --explain E0277`.