Moved variable still borrowing after calling `drop`?
问题 fn main() { let mut x: Vec<&i32> = vec![]; let a = 1; x.push(&a); drop(x); // x.len(); // error[E0382]: use of moved value: `x` } // `a` dropped here while still borrowed The compiler knows drop() drops x (as evident from the error in the commented-out code) but still thinks the variable is borrowing from a ! This is unfair! Should this be considered as one of numerous dupes of rust-lang/rust#6393 (which is now tracked by rust-lang/rfcs#811?) But the discussion there seems to be centered on