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

#![feature(type_alias_impl_trait)]

type F = impl core::future::Future<Output = u8>;

struct Bug {
    V1: [(); {
        fn concrete_use() -> F {
            //~^ ERROR expected `impl Future<Output = ()>` 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
        //~| ERROR destructors cannot be evaluated at compile-time
        1
    }],
}

fn main() {}