summaryrefslogtreecommitdiff
path: root/variables/variables3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'variables/variables3.rs')
-rw-r--r--variables/variables3.rs36
1 files changed, 35 insertions, 1 deletions
diff --git a/variables/variables3.rs b/variables/variables3.rs
index cadb40b..ec55a95 100644
--- a/variables/variables3.rs
+++ b/variables/variables3.rs
@@ -1,4 +1,4 @@
-// Make me compile!
+// Make me compile! Scroll down for hints :)
fn main() {
let x = 3;
@@ -6,3 +6,37 @@ fn main() {
x = 5;
println!("Number {}", x);
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// In Rust, variable bindings are immutable by default. But here we're trying
+// to reassign a different value to x! There's a keyword we can use to make
+// a variable binding mutable instead.