aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3551.rs
blob: 6d6a8129885d5a605011444628a2d34b964f2027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[lang = "sized"]
pub trait Sized {}

#[lang = "fn_once"]
pub trait FnOnce<Args> {
    #[lang = "fn_once_output"]
    type Output;

    extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
}

struct Bug {
    a: [(); (|| 0)()],
    // { dg-error "calls in constants are limited to constant functions, tuple structs and tuple variants" "" { target *-*-* } .-1 }
}