2022-02-11 07:18:06 +00:00
|
|
|
error[E0308]: mismatched types
|
2021-07-26 17:01:16 -03:00
|
|
|
--> $DIR/issue-78722.rs:12:20
|
|
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | type F = impl core::future::Future<Output = u8>;
|
|
|
|
|
| -------------------------------------- the expected opaque type
|
|
|
|
|
...
|
2021-07-26 17:01:16 -03:00
|
|
|
LL | let f: F = async { 1 };
|
2022-02-11 07:18:06 +00:00
|
|
|
| - ^^^^^^^^^^^ expected opaque type, found a different opaque type
|
|
|
|
|
| |
|
|
|
|
|
| expected due to this
|
2021-07-26 17:01:16 -03:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
::: $SRC_DIR/core/src/future/mod.rs:LL:COL
|
2021-07-26 17:01:16 -03:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
|
|
|
|
|
| ------------------------------- the found opaque type
|
|
|
|
|
|
|
|
|
|
|
= note: expected opaque type `impl Future<Output = u8>`
|
2022-03-22 19:25:43 -07:00
|
|
|
found opaque type `impl Future`
|
2022-02-11 07:18:06 +00:00
|
|
|
= note: distinct uses of `impl Trait` result in different opaque types
|
2021-07-26 17:01:16 -03:00
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
error: aborting due to previous error
|
2021-07-26 17:01:16 -03:00
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|