diff --git a/rust-em-10-minutos.html b/rust-em-10-minutos.html index f116884..a81bfbc 100644 --- a/rust-em-10-minutos.html +++ b/rust-em-10-minutos.html @@ -162,6 +162,7 @@
StackOverflow Survey 2023: "Most Admired Language" (84.6%)
@@ -242,6 +245,87 @@ func foo() {
+fn main() {
+ let a = 2;
+ a = 3;
+ println!("{}", a);
+}
+
+
+
+
+3 | let a = 2;
+ | -
+ | |
+ | first assignment to `a`
+ | help: make this binding mutable: `mut a`
+4 | a = 3;
+ | ^^^^^ cannot assign twice to immutable variable
+
+
+
+
+3 | let a = 2;
+ | -
+ | |
+ | first assignment to `a`
+ | help: make this binding mutable: `mut a`
+4 | a = 3;
+ | ^^^^^ cannot assign twice to immutable variable
+
+
+
+
+3 | let a = 2;
+ | -
+ | |
+ | first assignment to `a`
+ | help: make this binding mutable: `mut a`
+4 | a = 3;
+ | ^^^^^ cannot assign twice to immutable variable
+
+
+
+