Skip to content

Commit

Permalink
Rollup merge of rust-lang#54370 - nnethercote:better-domain_size, r=n…
Browse files Browse the repository at this point in the history
…ikomatsakis

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.
  • Loading branch information
pietroalbini authored Sep 22, 2018
2 parents 23636e3 + 99f05e8 commit 167a045
Show file tree
Hide file tree
Showing 6 changed files with 210 additions and 202 deletions.
4 changes: 2 additions & 2 deletions src/librustc/traits/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use ty::relate::TypeRelation;
use middle::lang_items;
use mir::interpret::{GlobalId};

use rustc_data_structures::bit_set::BitSet;
use rustc_data_structures::bit_set::GrowableBitSet;
use rustc_data_structures::sync::Lock;
use std::iter;
use std::cmp;
Expand Down Expand Up @@ -3054,7 +3054,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
} else {
return Err(Unimplemented);
};
let mut ty_params = BitSet::new_empty(substs_a.types().count());
let mut ty_params = GrowableBitSet::new_empty();
let mut found = false;
for ty in field.walk() {
if let ty::Param(p) = ty.sty {
Expand Down
Loading

0 comments on commit 167a045

Please sign in to comment.