Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRustborrow checker and NLLSingle-choice MCQ

Why does this compile under NLL even though `r` borrows `v` mutably and `v` is read afterward?

fn main() { let mut v = 10; let r = &mut v; *r += 1; println!("{}", v); }