Files
rust/src/test/ui/impl-trait/issues/issue-78722.stderr

24 lines
919 B
Plaintext
Raw Normal View History

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<Output = u8>`
2022-03-22 19:25:43 -07:00
found opaque type `impl Future`
= 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`.