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