Skip to content

Commit 167a045

Browse files
authored
Rollup merge of rust-lang#54370 - nnethercote:better-domain_size, r=nikomatsakis
Improve handling of type bounds in `bit_set.rs`. Currently, `BitSet` doesn't actually know its own domain size; it just knows how many words it contains. We can make it better.
2 parents 23636e3 + 99f05e8 commit 167a045

File tree

6 files changed

+210
-202
lines changed

6 files changed

+210
-202
lines changed

src/librustc/traits/select.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use ty::relate::TypeRelation;
4444
use middle::lang_items;
4545
use mir::interpret::{GlobalId};
4646

47-
use rustc_data_structures::bit_set::BitSet;
47+
use rustc_data_structures::bit_set::GrowableBitSet;
4848
use rustc_data_structures::sync::Lock;
4949
use std::iter;
5050
use std::cmp;
@@ -3054,7 +3054,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
30543054
} else {
30553055
return Err(Unimplemented);
30563056
};
3057-
let mut ty_params = BitSet::new_empty(substs_a.types().count());
3057+
let mut ty_params = GrowableBitSet::new_empty();
30583058
let mut found = false;
30593059
for ty in field.walk() {
30603060
if let ty::Param(p) = ty.sty {

0 commit comments

Comments
 (0)