fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB25 linesraw
1error[E0053]: method `foo` has an incompatible type for trait
2  --> $DIR/dont-project-to-specializable-projection.rs:14:5
3   |
4LL |     default async fn foo(_: T) -> &'static str {
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected associated type, found future
6   |
7note: type in trait
8  --> $DIR/dont-project-to-specializable-projection.rs:10:5
9   |
10LL |     async fn foo(_: T) -> &'static str;
11   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12   = note: expected signature `fn(_) -> impl Future<Output = &'static str>`
13              found signature `fn(_) -> impl Future<Output = &'static str>`
14
15error: async associated function in trait cannot be specialized
16  --> $DIR/dont-project-to-specializable-projection.rs:14:5
17   |
18LL |     default async fn foo(_: T) -> &'static str {
19   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20   |
21   = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
22
23error: aborting due to 2 previous errors
24
25For more information about this error, try `rustc --explain E0053`.