Skip to content

Instantly share code, notes, and snippets.

@alvalea
Last active August 29, 2015 14:17
Show Gist options
  • Save alvalea/f5f5997d40acb7a30252 to your computer and use it in GitHub Desktop.
Save alvalea/f5f5997d40acb7a30252 to your computer and use it in GitHub Desktop.
Rust references example
fn main() {
let x = Box::new(5);
let p = &x;
let pp : &i32 = &x;
println!("&x: {:p}", &x);
println!("p: {:p}", p);
println!("pp: {:p}", pp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment