Skip to content

Commit d48b674

Browse files
authored
Rollup merge of rust-lang#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 838a18c + 8787c0b commit d48b674

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
@@ -873,7 +873,7 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {
873873
let mut self_chunk_words = **other_chunk_words;
874874
for word in self_chunk_words[0..num_words].iter_mut().rev() {
875875
*word = !*word & tail_mask;
876-
tail_mask = u64::MAX;
876+
tail_mask = Word::MAX;
877877
}
878878
let self_chunk_count = chunk_domain_size - *other_chunk_count;
879879
debug_assert_eq!(
@@ -888,7 +888,7 @@ impl<T: Idx> BitRelations<ChunkedBitSet<T>> for ChunkedBitSet<T> {
888888
) => {
889889
// See `ChunkedBitSet::union` for details on what is happening here.
890890
let num_words = num_words(chunk_domain_size as usize);
891-
let op = |a: u64, b: u64| a & !b;
891+
let op = |a: Word, b: Word| a & !b;
892892
if !bitwise_changes(
893893
&self_chunk_words[0..num_words],
894894
&other_chunk_words[0..num_words],

0 commit comments

Comments
 (0)