Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardRusttwo-phase borrowsSingle-choice MCQ

Two-phase borrows tolerate a shared read of the receiver in the gap between reservation and activation, which is why `v.push(v.len())` compiles. Yet the snippet below is still rejected. What is the precise reason the two-phase mechanism does NOT rescue it?

fn main() { let mut v = vec![1, 2, 3]; v.push(v.pop().unwrap()); }