summary refs log tree commit diff
path: root/tests/crashes/120016.rs
blob: 09175689256a7a03aa41f060d6577c2c69ea1904 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ known-bug: #120016
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks) --edition=2021

#![feature(type_alias_impl_trait, const_async_blocks)]

struct Bug {
    V1: [(); {
        type F = impl std::future::Future<Output = impl Sized>;
        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() {}