]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-78722.stderr
remove [async output] from impl Future
[rust.git] / src / test / ui / impl-trait / issues / issue-78722.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-78722.rs:12:20
3    |
4 LL | type F = impl core::future::Future<Output = u8>;
5    |          -------------------------------------- the expected opaque type
6 ...
7 LL |         let f: F = async { 1 };
8    |                -   ^^^^^^^^^^^ expected opaque type, found a different opaque type
9    |                |
10    |                expected due to this
11    |
12   ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
13    |
14 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
15    |                                           ------------------------------- the found opaque type
16    |
17    = note: expected opaque type `impl Future<Output = u8>`
18               found opaque type `impl Future`
19    = note: distinct uses of `impl Trait` result in different opaque types
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0308`.