mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-09 10:00:11 -04:00
92dbb8a02b
core: drop unmapped ZSTs in array `map` Fixes https://github.com/rust-lang/rust/issues/152211. Alternative to rust-lang/rust#152220 and rust-lang/rust#152248. This makes the `Drain` type use the same ZST-handling strategy as `slice::IterMut`, which stores the remaining length instead of a one-past-the-end pointer when the type is a ZST. I've also removed the const-generic `N` parameter from `Drain` to avoid unnecessary monomorphizations.