fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[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 3 | 4LL | StructAsync { callback }.await; 5 | ^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future 6 | 7note: required by a bound in `StructAsync` 8 --> $DIR/issue-98634.rs:9:35 9 | 10LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> { 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` 12 13error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>` 14 --> $DIR/issue-98634.rs:45:9 15 | 16LL | StructAsync { callback }.await; 17 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future 18 | 19note: required by a bound in `StructAsync` 20 --> $DIR/issue-98634.rs:9:35 21 | 22LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> { 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` 24 25error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>` 26 --> $DIR/issue-98634.rs:45:34 27 | 28LL | StructAsync { callback }.await; 29 | ^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future 30 | 31note: required by a bound in `StructAsync` 32 --> $DIR/issue-98634.rs:9:35 33 | 34LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> { 35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync` 36 37error: aborting due to 3 previous errors 38 39For more information about this error, try `rustc --explain E0271`.