Skip to content

Commit 7604d12

Browse files
authored
Rollup merge of #147751 - nnethercote:bit_set-Word, r=Zalathar
Use `bit_set::Word` in a couple more places. It's a synonym for `u64` and there are a couple of places where we use `u64` where we should use `Word`, which this commit fixes. I found this when I tried changing `Word` to `u128` (which made performance worse). r? `````@Zalathar`````
2 parents 6f66f3b + 8787c0b commit 7604d12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_index/src/bit_set.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {
872872
let mut self_chunk_words = **other_chunk_words;
873873
for word in self_chunk_words[0..num_words].iter_mut().rev() {
874874
*word = !*word & tail_mask;
875-
tail_mask = u64::MAX;
875+
tail_mask = Word::MAX;
876876
}
877877
let self_chunk_count = chunk_domain_size - *other_chunk_count;
878878
debug_assert_eq!(
@@ -887,7 +887,7 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {
887887
) => {
888888
// See `ChunkedBitSet::union` for details on what is happening here.
889889
let num_words = num_words(chunk_domain_size as usize);
890-
let op = |a: u64, b: u64| a & !b;
890+
let op = |a: Word, b: Word| a & !b;
891891
if !bitwise_changes(
892892
&self_chunk_words[0..num_words],
893893
&other_chunk_words[0..num_words],

0 commit comments

Comments
 (0)