Skip to content

Commit 06faf58

Browse files
committed
Remove BitSet::words.
1 parent 2b603f9 commit 06faf58

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

compiler/rustc_index/src/bit_set.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,6 @@ impl<T: Idx> BitSet<T> {
237237
new_word != word
238238
}
239239

240-
/// Gets a slice of the underlying words.
241-
pub fn words(&self) -> &[Word] {
242-
&self.words
243-
}
244-
245240
/// Iterates over the indices of set bits in a sorted order.
246241
#[inline]
247242
pub fn iter(&self) -> BitIter<'_, T> {
@@ -1601,11 +1596,11 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
16011596
pub fn from_row_n(row: &BitSet<C>, num_rows: usize) -> BitMatrix<R, C> {
16021597
let num_columns = row.domain_size();
16031598
let words_per_row = num_words(num_columns);
1604-
assert_eq!(words_per_row, row.words().len());
1599+
assert_eq!(words_per_row, row.words.len());
16051600
BitMatrix {
16061601
num_rows,
16071602
num_columns,
1608-
words: iter::repeat(row.words()).take(num_rows).flatten().cloned().collect(),
1603+
words: iter::repeat(&row.words).take(num_rows).flatten().cloned().collect(),
16091604
marker: PhantomData,
16101605
}
16111606
}
@@ -1700,9 +1695,9 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
17001695
assert_eq!(with.domain_size(), self.num_columns);
17011696
let (write_start, write_end) = self.range(write);
17021697
let mut changed = false;
1703-
for (read_index, write_index) in iter::zip(0..with.words().len(), write_start..write_end) {
1698+
for (read_index, write_index) in iter::zip(0..with.words.len(), write_start..write_end) {
17041699
let word = self.words[write_index];
1705-
let new_word = word | with.words()[read_index];
1700+
let new_word = word | with.words[read_index];
17061701
self.words[write_index] = new_word;
17071702
changed |= word != new_word;
17081703
}

0 commit comments

Comments
 (0)