I was reading the old rust documentation (the one that shipped with rust 1.3) and found this example. For the convenience of reading I am quoting the example here as well:
fn main() {
let mut x = 5;
let y = &mut x;
*y += 1;
println!("{}", x);
}
It said if I try to build it, it will throw an error such:
error: cannot borrow `x` as immutable because it is also borrowed as mutable
println!("{}", x);
^
But I could compile and run it without any error. Was there any major version migration that eliminated this kind of error message?