blob: 23d5d4c9e1096df4d8097b0a25a05cc931e0cb52 [file]
// Regression test for #152694
// Verify that we don't emit invalid suggestions (adding `ref` or `clone()`)
// when a destructuring assignment involves a type that implements `Drop`.
struct Thing(String);
impl Drop for Thing {
fn drop(&mut self) {}
}
fn main() {
Thing(*&mut String::new()) = Thing(String::new());
//~^ ERROR cannot move out of type `Thing`, which implements the `Drop` trait
}