2 ms·
Mutable references can never coexist with other references in Rust, regardless of whether they're on different threads. This will not compile: let x = 42;
by School-Cotton 3y ago
Mutable references can never coexist with other references in Rust, regardless of whether they're on different threads.
This will not compile:
let x = 42;
let r1 = &x;
let m1 = &mut x;
println!("{r1}");