|
1 | 1 | error[E0053]: method `foo` has an incompatible type for trait
|
2 |
| - --> $DIR/dont-project-to-specializable-projection.rs:13:5 |
| 2 | + --> $DIR/dont-project-to-specializable-projection.rs:14:5 |
3 | 3 | |
|
4 | 4 | LL | default async fn foo(_: T) -> &'static str {
|
5 | 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found future
|
6 | 6 | |
|
7 | 7 | note: type in trait
|
8 |
| - --> $DIR/dont-project-to-specializable-projection.rs:9:5 |
| 8 | + --> $DIR/dont-project-to-specializable-projection.rs:10:5 |
9 | 9 | |
|
10 | 10 | LL | async fn foo(_: T) -> &'static str;
|
11 | 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
12 | 12 | = note: expected signature `fn(_) -> impl Future<Output = &'static str>`
|
13 | 13 | found signature `fn(_) -> impl Future<Output = &'static str>`
|
14 | 14 |
|
15 | 15 | error: async associated function in trait cannot be specialized
|
16 |
| - --> $DIR/dont-project-to-specializable-projection.rs:13:5 |
| 16 | + --> $DIR/dont-project-to-specializable-projection.rs:14:5 |
17 | 17 | |
|
18 | 18 | LL | default async fn foo(_: T) -> &'static str {
|
19 | 19 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
20 | 20 | |
|
21 | 21 | = note: specialization behaves in inconsistent and surprising ways with async functions in traits, and for now is disallowed
|
22 | 22 |
|
23 |
| -error: aborting due to 2 previous errors |
| 23 | +error[E0599]: no method named `poll` found for struct `Pin<&mut impl Future<Output = ()>>` in the current scope |
| 24 | + --> $DIR/dont-project-to-specializable-projection.rs:50:28 |
| 25 | + | |
| 26 | +LL | match fut.as_mut().poll(ctx) { |
| 27 | + | ^^^^ method not found in `Pin<&mut impl Future<Output = ()>>` |
| 28 | + --> $SRC_DIR/core/src/future/future.rs:LL:COL |
| 29 | + | |
| 30 | + = note: the method is available for `Pin<&mut impl Future<Output = ()>>` here |
| 31 | + | |
| 32 | + = help: items from traits can only be used if the trait is in scope |
| 33 | +help: the following trait is implemented but not in scope; perhaps add a `use` for it: |
| 34 | + | |
| 35 | +LL + use std::future::Future; |
| 36 | + | |
| 37 | + |
| 38 | +error: aborting due to 3 previous errors |
24 | 39 |
|
25 |
| -For more information about this error, try `rustc --explain E0053`. |
| 40 | +Some errors have detailed explanations: E0053, E0599. |
| 41 | +For more information about an error, try `rustc --explain E0053`. |
0 commit comments