diff options
author | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-15 14:48:59 -0400 |
---|---|---|
committer | Zachary Ferguson <zfergus2@users.noreply.github.com> | 2015-10-15 14:48:59 -0400 |
commit | 65bb71f4bde383a4d0b8cd6fd49901bb6e2cfa5f (patch) | |
tree | 03802f50ac31b295ace0585ccb6bc1ea6ef9b612 /rust.html.markdown | |
parent | a4ea3961744c3c1ee6fcf654f011caa8dbadf56e (diff) | |
parent | 68953bd9d97328b8660dad06edd8acb8ff330ede (diff) |
Merge remote-tracking branch 'refs/remotes/adambard/master'
Conflicts:
c.html.markdown
Diffstat (limited to 'rust.html.markdown')
-rw-r--r-- | rust.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust.html.markdown b/rust.html.markdown index b2854b0c..d0c56b4a 100644 --- a/rust.html.markdown +++ b/rust.html.markdown @@ -287,9 +287,9 @@ fn main() { // While a value is mutably borrowed, it cannot be accessed at all. let mut var2 = 4; let ref_var2: &mut i32 = &mut var2; - *ref_var2 += 2; + *ref_var2 += 2; // '*' is used to point to the mutably borrowed var2 - println!("{}", *ref_var2); // 6 + println!("{}", *ref_var2); // 6 , //var2 would not compile. //ref_var2 is of type &mut i32, so //stores a reference to an i32 not the value. // var2 = 2; // this would not compile because `var2` is borrowed } ``` |