I'm not sure if the optimizer is smart enough, but `needs_drop()` would certainly help. Blocked by https://github.com/rust-lang/rust/issues/41890.