//@ edition: 2018 // Regression test for . struct NeedsDrop<'a>(&'a Vec); async fn await_point() {} impl Drop for NeedsDrop<'_> { fn drop(&mut self) {} } fn foo() { let v = vec![1, 2, 3]; let x = NeedsDrop(&v); let c = async { std::future::ready(()).await; drop(x); }; drop(v); //~^ ERROR cannot move out of `v` because it is borrowed } fn main() {}