1 error[E0277]: `<impl Foo as Foo>::Bar` cannot be sent between threads safely
2 --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:14:20
4 LL | assert_is_send(&bar);
5 | -------------- ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
7 | required by a bound introduced by this call
9 = help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
10 note: required by a bound in `assert_is_send`
11 --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22
13 LL | fn assert_is_send<T: Send>(_: &T) {}
14 | ^^^^ required by this bound in `assert_is_send`
15 help: introduce a type parameter with a trait bound instead of using `impl Trait`
17 LL | async fn run<F: Foo>(_: &(), foo: F) -> std::io::Result<()> where <F as Foo>::Bar: Send {
18 | ++++++++ ~ +++++++++++++++++++++++++++
20 error[E0277]: `<impl Foo as Foo>::Bar` cannot be sent between threads safely
21 --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:24:20
23 LL | assert_is_send(&bar);
24 | -------------- ^^^^ `<impl Foo as Foo>::Bar` cannot be sent between threads safely
26 | required by a bound introduced by this call
28 = help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
29 note: required by a bound in `assert_is_send`
30 --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22
32 LL | fn assert_is_send<T: Send>(_: &T) {}
33 | ^^^^ required by this bound in `assert_is_send`
34 help: introduce a type parameter with a trait bound instead of using `impl Trait`
36 LL | async fn run2<F: Foo>(_: &(), foo: F) -> std::io::Result<()> where <F as Foo>::Bar: Send {
37 | ~~~~~~~~ ~ +++++++++++++++++++++++++++
39 error: aborting due to 2 previous errors
41 For more information about this error, try `rustc --explain E0277`.