]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-51559.rs
Rollup merge of #81697 - xfix:every-doc-alias, r=Mark-Simulacrum
[rust.git] / src / test / ui / consts / issue-51559.rs
1 #![feature(const_raw_ptr_to_usize_cast)]
2
3 const BAR: *mut () = ((|| 3) as fn() -> i32) as *mut ();
4 pub const FOO: usize = unsafe { BAR as usize };
5 //~^ ERROR any use of this value will cause an error
6 //~| WARN this was previously accepted by the compiler but is being phased out
7
8 fn main() {}