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