Skip to content

Commit c48650d

Browse files
committed
bug fix to borrowck::indexed_set: wanted bit-count not byte-count.
1 parent 71af40b commit c48650d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_borrowck/indexed_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl<T: Idx> fmt::Debug for IdxSet<T> {
5757

5858
impl<T: Idx> OwnIdxSet<T> {
5959
fn new(init: Word, universe_size: usize) -> Self {
60-
let bits_per_word = mem::size_of::<Word>();
60+
let bits_per_word = mem::size_of::<Word>() * 8;
6161
let num_words = (universe_size + (bits_per_word - 1)) / bits_per_word;
6262
OwnIdxSet {
6363
_pd: Default::default(),

0 commit comments

Comments
 (0)