Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions compiler/rustc_index/src/bit_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,19 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {

impl<T: Idx> BitRelations<HybridBitSet<T>> for ChunkedBitSet<T> {
fn union(&mut self, other: &HybridBitSet<T>) -> bool {
// FIXME: this is slow if `other` is dense, and could easily be
// improved, but it hasn't been a problem in practice so far.
// FIXME: This is slow if `other` is dense, but it hasn't been a problem
// in practice so far.
// If a a faster implementation of this operation is required, consider
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny typo here and below

Suggested change
// If a a faster implementation of this operation is required, consider
// If a faster implementation of this operation is required, consider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's stupid, thanks for catching it! Fixes in #94956

// reopening https://github.com/rust-lang/rust/pull/94625
assert_eq!(self.domain_size, other.domain_size());
sequential_update(|elem| self.insert(elem), other.iter())
}

fn subtract(&mut self, other: &HybridBitSet<T>) -> bool {
// FIXME: this is slow if `other` is dense, and could easily be
// improved, but it hasn't been a problem in practice so far.
// FIXME: This is slow if `other` is dense, but it hasn't been a problem
// in practice so far.
// If a a faster implementation of this operation is required, consider
// reopening https://github.com/rust-lang/rust/pull/94625
assert_eq!(self.domain_size, other.domain_size());
sequential_update(|elem| self.remove(elem), other.iter())
}
Expand Down