Created
February 27, 2020 17:02
-
-
Save fatihgokce/9ab26c373e151488c2c70c8a480fa90c to your computer and use it in GitHub Desktop.
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
fn foo(b: &mut u64) { | |
let x = &mut *b; | |
*x=52; | |
} | |
fn main() { | |
let mut x = 42; | |
foo(&mut x); | |
println!("{}",x); | |
let mut s1=5;//String::from("aa"); | |
let s2=&mut s1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment