Last active
August 29, 2015 14:17
-
-
Save alvalea/f5f5997d40acb7a30252 to your computer and use it in GitHub Desktop.
Rust references example
This file contains hidden or 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
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