Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created September 21, 2019 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/3afc5bf34e9cb3eb8d46f7223877e5f3 to your computer and use it in GitHub Desktop.
Save rust-play/3afc5bf34e9cb3eb8d46f7223877e5f3 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
#[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