summaryrefslogtreecommitdiffhomepage
path: root/rust.html.markdown
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2015-09-25 06:36:17 +0800
committerAdam Bard <github@adambard.com>2015-09-25 06:36:17 +0800
commit119f341028c8b1391d2227311b0803eaf542f300 (patch)
tree2dae4e2b8c26ac5fa74665dc1fc1d44fb6fb344d /rust.html.markdown
parenta26fa87134efa6e55ed89b7bac958588ae0dadd9 (diff)
parent337710e13d726b91fd6cdde9e58d8c0db24c73f0 (diff)
Merge pull request #1138 from jin/patch-1
Fixed typo: changing an immutable ref will not compile
Diffstat (limited to 'rust.html.markdown')
-rw-r--r--rust.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust.html.markdown b/rust.html.markdown
index dd03acdd..4fbd6144 100644
--- a/rust.html.markdown
+++ b/rust.html.markdown
@@ -281,7 +281,7 @@ fn main() {
println!("{}", var); // Unlike `box`, `var` can still be used
println!("{}", *ref_var);
// var = 5; // this would not compile because `var` is borrowed
- // *ref_var = 6; // this would too, because `ref_var` is an immutable reference
+ // *ref_var = 6; // this would not too, because `ref_var` is an immutable reference
// Mutable reference
// While a value is mutably borrowed, it cannot be accessed at all.