]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/issues/issue-78722.rs
Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into sync_cg_clif-2022-10-23
[rust.git] / src / test / ui / impl-trait / issues / issue-78722.rs
1 // edition:2018
2
3 #![feature(type_alias_impl_trait)]
4
5 type F = impl core::future::Future<Output = u8>;
6
7 struct Bug {
8     V1: [(); {
9         fn concrete_use() -> F {
10             //~^ ERROR expected `impl Future<Output = ()>` to be a future that resolves to `u8`, but it resolves to `()`
11             async {}
12         }
13         let f: F = async { 1 };
14         //~^ ERROR `async` blocks are not allowed in constants
15         //~| ERROR destructor of
16         1
17     }],
18 }
19
20 fn main() {}