Tired of reading long Rust documentation? Learn how smart Rust is in 1 min. Let’s dive in: 1 let mut x = 10; // Create a mutable variable 2 let y = &mut x; // Borrow it mutably 3 println!("{}", x); // Access the variable directly 4 // println!("{}", y); // Uncommenting this will cause an error in line 3!
Here’s the cool part: Line 3 prints x just fine. But if you uncomment line 4, Rust wi