@@ -12,7 +12,7 @@ LL | async fn foo() {}
1212 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
1313
1414error[E0706]: functions in traits cannot be declared `async`
15- --> $DIR/async-trait-fn.rs:5 :5
15+ --> $DIR/async-trait-fn.rs:4 :5
1616 |
1717LL | async fn bar(&self) {}
1818 | -----^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL | async fn bar(&self) {}
2525 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
2626
2727error[E0706]: functions in traits cannot be declared `async`
28- --> $DIR/async-trait-fn.rs:7 :5
28+ --> $DIR/async-trait-fn.rs:5 :5
2929 |
3030LL | async fn baz() {
3131 | -----^^^^^^^^^
@@ -37,54 +37,6 @@ LL | async fn baz() {
3737 = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
3838 = help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
3939
40- error[E0308]: mismatched types
41- --> $DIR/async-trait-fn.rs:3:20
42- |
43- LL | async fn foo() {}
44- | ^^ expected associated type, found opaque type
45- |
46- ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
47- |
48- LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
49- | ------------------------------- the found opaque type
50- |
51- = note: expected associated type `impl Future<Output = ()>` (trait associated opaque type at <$DIR/async-trait-fn.rs:3:20>)
52- found opaque type `impl Future<Output = ()>` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
53-
54- error[E0308]: mismatched types
55- --> $DIR/async-trait-fn.rs:5:25
56- |
57- LL | async fn bar(&self) {}
58- | ^^ expected associated type, found opaque type
59- |
60- ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
61- |
62- LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
63- | ------------------------------- the found opaque type
64- |
65- = note: expected associated type `impl Future<Output = ()>` (trait associated opaque type at <$DIR/async-trait-fn.rs:5:25>)
66- found opaque type `impl Future<Output = ()>` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
67-
68- error[E0308]: mismatched types
69- --> $DIR/async-trait-fn.rs:7:20
70- |
71- LL | async fn baz() {
72- | ____________________^
73- LL | |
74- LL | | // Nested item must not ICE.
75- LL | | fn a() {}
76- LL | | }
77- | |_____^ expected associated type, found opaque type
78- |
79- ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
80- |
81- LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
82- | ------------------------------- the found opaque type
83- |
84- = note: expected associated type `impl Future<Output = ()>` (trait associated opaque type at <$DIR/async-trait-fn.rs:7:20>)
85- found opaque type `impl Future<Output = ()>` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
86-
87- error: aborting due to 6 previous errors
40+ error: aborting due to 3 previous errors
8841
89- Some errors have detailed explanations: E0308, E0706.
90- For more information about an error, try `rustc --explain E0308`.
42+ For more information about this error, try `rustc --explain E0706`.
0 commit comments