debuginfo: Change C++-like encoding for enums.

The updated encoding should be able to handle niche layouts where
more than one variant has fields.
This commit is contained in:
Michael Woerister 2022-06-20 17:50:27 +02:00
parent e2b52ff73e
commit 622da5d834
15 changed files with 864 additions and 386 deletions

View file

@ -172,7 +172,9 @@ impl<I: Idx, T> IndexVec<I, T> {
}
#[inline]
pub fn indices(&self) -> impl DoubleEndedIterator<Item = I> + ExactSizeIterator + 'static {
pub fn indices(
&self,
) -> impl DoubleEndedIterator<Item = I> + ExactSizeIterator + Clone + 'static {
(0..self.len()).map(|n| I::new(n))
}