fork/rust

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

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

master
1020 B25 linesraw
1error: future cannot be sent between threads safely
2  --> $DIR/missing-send-bound.rs:14:20
3   |
4LL |     assert_is_send(test::<T>());
5   |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
6   |
7   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
8note: future is not `Send` as it awaits another future which is not `Send`
9  --> $DIR/missing-send-bound.rs:10:5
10   |
11LL |     T::bar().await;
12   |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
13note: required by a bound in `assert_is_send`
14  --> $DIR/missing-send-bound.rs:18:27
15   |
16LL | fn assert_is_send(_: impl Send) {}
17   |                           ^^^^ required by this bound in `assert_is_send`
18help: `Send` can be made part of the associated future's guarantees for all implementations of `Foo::bar`
19   |
20LL -     async fn bar();
21LL +     fn bar() -> impl std::future::Future<Output = ()> + Send;
22   |
23
24error: aborting due to previous error
25