Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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}");


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: