summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/issues/issue-78722.rs
blob: 75ccc8d8e8a9ab89ab18a889bc60ae0a56835de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// edition:2018

#![feature(type_alias_impl_trait)]

struct Bug {
    V1: [(); {
        type F = impl core::future::Future<Output = u8>;
        fn concrete_use() -> F {
            //~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
            async {}
        }
        let f: F = async { 1 };
        //~^ ERROR `async` blocks are not allowed in constants
        1
    }],
}

fn main() {}