fork/rust

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

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

master
738 B17 linesraw
1error[E0053]: method `foo` has an incompatible type for trait
2  --> $DIR/async-example-desugared-boxed-in-trait.rs:15:5
3   |
4LL |     async fn foo(&self) -> i32 {
5   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
6   |
7note: type in trait
8  --> $DIR/async-example-desugared-boxed-in-trait.rs:11:22
9   |
10LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
11   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12   = note: expected signature `fn(&i32) -> Pin<Box<dyn Future<Output = i32>>>`
13              found signature `fn(&i32) -> impl Future<Output = i32>`
14
15error: aborting due to previous error
16
17For more information about this error, try `rustc --explain E0053`.