Created
September 21, 2019 10:58
-
-
Save rust-play/3afc5bf34e9cb3eb8d46f7223877e5f3 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Copy, Clone)] struct ZST; | |
fn main() { | |
let mut xs = [ZST; 2]; | |
assert_eq!( | |
&mut xs[0] as *mut _ as usize, | |
&mut xs[1] as *mut _ as usize | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment