]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/in-trait/missing-send-bound.stderr
Rollup merge of #107186 - GuillaumeGomez:correct-pseudo-element-selector, r=notriddle
[rust.git] / tests / ui / async-await / in-trait / missing-send-bound.stderr
1 warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/missing-send-bound.rs:3:12
3    |
4 LL | #![feature(async_fn_in_trait)]
5    |            ^^^^^^^^^^^^^^^^^
6    |
7    = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
8    = note: `#[warn(incomplete_features)]` on by default
9
10 error: future cannot be sent between threads safely
11   --> $DIR/missing-send-bound.rs:15:20
12    |
13 LL |     assert_is_send(test::<T>());
14    |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
15    |
16    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
17 note: future is not `Send` as it awaits another future which is not `Send`
18   --> $DIR/missing-send-bound.rs:11:5
19    |
20 LL |     T::bar().await;
21    |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
22 note: required by a bound in `assert_is_send`
23   --> $DIR/missing-send-bound.rs:19:27
24    |
25 LL | fn assert_is_send(_: impl Send) {}
26    |                           ^^^^ required by this bound in `assert_is_send`
27
28 error: aborting due to previous error; 1 warning emitted
29