1 error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
2 --> $DIR/issue-98634.rs:45:23
4 LL | StructAsync { callback }.await;
5 | ^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
7 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
8 found opaque type `impl Future<Output = ()>`
9 note: required by a bound in `StructAsync`
10 --> $DIR/issue-98634.rs:9:35
12 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
15 error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
16 --> $DIR/issue-98634.rs:45:9
18 LL | StructAsync { callback }.await;
19 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
21 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
22 found opaque type `impl Future<Output = ()>`
23 note: required by a bound in `StructAsync`
24 --> $DIR/issue-98634.rs:9:35
26 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
29 error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
30 --> $DIR/issue-98634.rs:45:33
32 LL | StructAsync { callback }.await;
33 | ^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found opaque type
35 = note: expected struct `Pin<Box<(dyn Future<Output = ()> + 'static)>>`
36 found opaque type `impl Future<Output = ()>`
37 note: required by a bound in `StructAsync`
38 --> $DIR/issue-98634.rs:9:35
40 LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
43 error: aborting due to 3 previous errors
45 For more information about this error, try `rustc --explain E0271`.