Skip to content

Commit 0432322

Browse files
committed
Use regular Vec in BitSet.
1 parent 8927649 commit 0432322

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

compiler/rustc_index/src/bit_set.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::{fmt, iter, slice};
88
use Chunk::*;
99
#[cfg(feature = "nightly")]
1010
use rustc_macros::{Decodable_NoContext, Encodable_NoContext};
11-
use smallvec::{SmallVec, smallvec};
1211

1312
use crate::{Idx, IndexVec};
1413

@@ -118,7 +117,7 @@ macro_rules! bit_relations_inherent_impls {
118117
#[derive(Eq, PartialEq, Hash)]
119118
pub struct DenseBitSet<T> {
120119
domain_size: usize,
121-
words: SmallVec<[Word; 2]>,
120+
words: Vec<Word>,
122121
marker: PhantomData<T>,
123122
}
124123

@@ -134,15 +133,15 @@ impl<T: Idx> DenseBitSet<T> {
134133
#[inline]
135134
pub fn new_empty(domain_size: usize) -> DenseBitSet<T> {
136135
let num_words = num_words(domain_size);
137-
DenseBitSet { domain_size, words: smallvec![0; num_words], marker: PhantomData }
136+
DenseBitSet { domain_size, words: vec![0; num_words], marker: PhantomData }
138137
}
139138

140139
/// Creates a new, filled bitset with a given `domain_size`.
141140
#[inline]
142141
pub fn new_filled(domain_size: usize) -> DenseBitSet<T> {
143142
let num_words = num_words(domain_size);
144143
let mut result =
145-
DenseBitSet { domain_size, words: smallvec![!0; num_words], marker: PhantomData };
144+
DenseBitSet { domain_size, words: vec![!0; num_words], marker: PhantomData };
146145
result.clear_excess_bits();
147146
result
148147
}
@@ -1442,7 +1441,7 @@ impl<T: Idx> From<DenseBitSet<T>> for GrowableBitSet<T> {
14421441
pub struct BitMatrix<R: Idx, C: Idx> {
14431442
num_rows: usize,
14441443
num_columns: usize,
1445-
words: SmallVec<[Word; 2]>,
1444+
words: Vec<Word>,
14461445
marker: PhantomData<(R, C)>,
14471446
}
14481447

@@ -1455,7 +1454,7 @@ impl<R: Idx, C: Idx> BitMatrix<R, C> {
14551454
BitMatrix {
14561455
num_rows,
14571456
num_columns,
1458-
words: smallvec![0; num_rows * words_per_row],
1457+
words: vec![0; num_rows * words_per_row],
14591458
marker: PhantomData,
14601459
}
14611460
}

0 commit comments

Comments
 (0)