Skip to content

Commit efdf948

Browse files
committed
use FxHashMap instead of BTreeMap
1 parent 3d26f5a commit efdf948

File tree

1 file changed

+3
-4
lines changed
  • compiler/rustc_infer/src/infer

1 file changed

+3
-4
lines changed

compiler/rustc_infer/src/infer/mod.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use rustc_span::symbol::Symbol;
3333
use rustc_span::Span;
3434

3535
use std::cell::{Cell, Ref, RefCell};
36-
use std::collections::BTreeMap;
3736
use std::fmt;
3837

3938
use self::combine::CombineFields;
@@ -1532,14 +1531,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
15321531
return inner;
15331532
}
15341533

1535-
let mut region_map = BTreeMap::new();
1534+
let mut region_map = FxHashMap::default();
15361535
let fld_r = |br: ty::BoundRegion| {
15371536
*region_map
15381537
.entry(br)
15391538
.or_insert_with(|| self.next_region_var(LateBoundRegion(span, br.kind, lbrct)))
15401539
};
15411540

1542-
let mut ty_map = BTreeMap::new();
1541+
let mut ty_map = FxHashMap::default();
15431542
let fld_t = |bt: ty::BoundTy| {
15441543
*ty_map.entry(bt).or_insert_with(|| {
15451544
self.next_ty_var(TypeVariableOrigin {
@@ -1548,7 +1547,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
15481547
})
15491548
})
15501549
};
1551-
let mut ct_map = BTreeMap::new();
1550+
let mut ct_map = FxHashMap::default();
15521551
let fld_c = |bc: ty::BoundVar, ty| {
15531552
*ct_map.entry(bc).or_insert_with(|| {
15541553
self.next_const_var(

0 commit comments

Comments
 (0)