Idea: introduce core::ptr::read_owned

This is not quite what happens today, though. It can't be what drop_in_place does, because ManuallyDrop::drop exists, and ManuallyDrop preserves niches, which means that it must preserve validity invariants, which means that drop_in_place overwriting the memory with undef can't happen because that would be UB.

2 Likes