0

On the following Link, Where it mentions thinking in scopes, there's an example such as:

fn main() {
    let mut x = 5;
    let y = &mut x;

    *y += 1;

    println!("{}", x);
}

and it mentions that this will produce the error.

I run it on rust playground(https://play.rust-lang.org/) and seems like no error at all. Any idea why it's compiling ?

Nika Kurashvili
  • 5,176
  • 8
  • 34
  • 92
  • 3
    The documentation you're pointing is very old v1.25 of Rust (2018), the stable version used in rust playground is v1.58.1. – Mario Santini Feb 23 '22 at 09:38

0 Answers0