fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB35 linesraw
1error[E0277]: `NotSend` cannot be sent between threads safely
2  --> $DIR/partial-drop-partial-reinit.rs:6:16
3   |
4LL |     gimme_send(foo());
5   |     ---------- ^^^^^ `NotSend` cannot be sent between threads safely
6   |     |
7   |     required by a bound introduced by this call
8...
9LL | async fn foo() {
10   | -------------- within this `impl Future<Output = ()>`
11   |
12   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
13   = note: required because it appears within the type `(NotSend,)`
14   = note: required because it captures the following types: `(NotSend,)`, `impl Future<Output = ()>`
15note: required because it's used within this `async fn` body
16  --> $DIR/partial-drop-partial-reinit.rs:28:16
17   |
18LL |   async fn foo() {
19   |  ________________^
20LL | |
21LL | |
22LL | |     let mut x = (NotSend {},);
23...  |
24LL | |     bar().await;
25LL | | }
26   | |_^
27note: required by a bound in `gimme_send`
28  --> $DIR/partial-drop-partial-reinit.rs:14:18
29   |
30LL | fn gimme_send<T: Send>(t: T) {
31   |                  ^^^^ required by this bound in `gimme_send`
32
33error: aborting due to previous error
34
35For more information about this error, try `rustc --explain E0277`.