]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-52432.rs
Rollup merge of #67255 - tuxillo:remove-i686-unknown-dragonfly, r=alexcrichton
[rust.git] / src / test / ui / consts / issue-52432.rs
1 #![feature(const_raw_ptr_to_usize_cast)]
2
3 fn main() {
4     [(); &(static |x| {}) as *const _ as usize];
5     //~^ ERROR: closures cannot be static
6     //~| ERROR: type annotations needed
7     [(); &(static || {}) as *const _ as usize];
8     //~^ ERROR: closures cannot be static
9     //~| ERROR: evaluation of constant value failed
10 }