summary refs log tree commit diff
path: root/src/test/ui/consts/issue-52432.rs
blob: d719bf1b97161668d5fb305df2f6e81448788f70 (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(const_raw_ptr_to_usize_cast)]

fn main() {
    [(); &(static |x| {}) as *const _ as usize];
    //~^ ERROR: closures cannot be static
    //~| ERROR: type annotations needed
    [(); &(static || {}) as *const _ as usize];
    //~^ ERROR: closures cannot be static
    //~| ERROR evaluation of constant value failed
}