mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-24 14:34:23 +00:00
6 lines
164 B
Rust
6 lines
164 B
Rust
fn main() {
|
|
const X: u32 = 1;
|
|
const Y: usize = unsafe { &X as *const u32 as usize }; //~ ERROR pointers cannot be cast to integers
|
|
println!("{}", Y);
|
|
}
|