Skip to content

Commit bcf90b6

Browse files
Tage Johanssonlqd
Tage Johansson
authored andcommitted
Implement FusedIterator for BitIter.
1 parent 9ca10a4 commit bcf90b6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_index/src/bit_set/thin_bit_set.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::alloc::{Layout, alloc, alloc_zeroed, dealloc, handle_alloc_error, realloc};
22
use std::hash::{Hash, Hasher};
3+
use std::iter::FusedIterator;
34
use std::marker::PhantomData;
45
use std::mem::ManuallyDrop;
56
use std::ops::{Range, RangeInclusive};
@@ -1077,6 +1078,8 @@ impl<'a, T: Idx> Iterator for BitIter<'a, T> {
10771078
}
10781079
}
10791080

1081+
impl<'a, T: Idx> FusedIterator for BitIter<'a, T> {}
1082+
10801083
impl<T: Idx> fmt::Debug for ThinBitSet<T> {
10811084
fn fmt(&self, w: &mut fmt::Formatter<'_>) -> fmt::Result {
10821085
w.debug_list().entries(self.iter()).finish()

0 commit comments

Comments
 (0)