mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Solution update
This commit is contained in:
@ -82,14 +82,16 @@ fn main() {
|
||||
fn main() {
|
||||
let mut x: i32 = 1;
|
||||
x = 7;
|
||||
// shadowing and re-binding
|
||||
let x = x;
|
||||
// x += 3;
|
||||
// Shadowing and re-binding
|
||||
let mut x = x;
|
||||
x += 3;
|
||||
|
||||
|
||||
let y = 4;
|
||||
// shadowing
|
||||
let y = "I can also be bound to text!";
|
||||
// Shadowing
|
||||
let y = "I can also be bound to text!";
|
||||
|
||||
println!("Success!");
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user