]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-78722.full_tait.stderr
Rollup merge of #87307 - michaelwoerister:pgo-unwind-msvc, r=nagisa
[rust.git] / src / test / ui / impl-trait / issues / issue-78722.full_tait.stderr
1 warning: the feature `type_alias_impl_trait` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/issue-78722.rs:5:32
3    |
4 LL | #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
5    |                                ^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8    = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
9
10 error[E0308]: mismatched types
11   --> $DIR/issue-78722.rs:15:20
12    |
13 LL | type F = impl core::future::Future<Output = u8>;
14    |          -------------------------------------- the expected opaque type
15 ...
16 LL |         let f: F = async { 1 };
17    |                -   ^^^^^^^^^^^ expected opaque type, found a different opaque type
18    |                |
19    |                expected due to this
20    | 
21   ::: $SRC_DIR/core/src/future/mod.rs:LL:COL
22    |
23 LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
24    |                                           ------------------------------- the found opaque type
25    |
26    = note: expected opaque type `impl Future` (opaque type at <$DIR/issue-78722.rs:8:10>)
27               found opaque type `impl Future` (opaque type at <$SRC_DIR/core/src/future/mod.rs:LL:COL>)
28    = note: distinct uses of `impl Trait` result in different opaque types
29
30 error: aborting due to previous error; 1 warning emitted
31
32 For more information about this error, try `rustc --explain E0308`.