summary refs log tree commit diff
path: root/src/test/ui/consts/issue-52432.rs
blob: 2d4c939f47d795369a55f4c89dc68bc0d1263e77 (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
}