diff options
Diffstat (limited to '')
-rw-r--r-- | compiler/rustc_index/src/vec.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs index 30ff36421..4172ce3bb 100644 --- a/compiler/rustc_index/src/vec.rs +++ b/compiler/rustc_index/src/vec.rs @@ -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)) } |