about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2022-06-10 10:09:05 +0200
committerlcnr <rust@lcnr.de>2022-06-10 14:24:36 +0200
commitefdf948f43a6416c2104430c53860d4f4032b812 (patch)
tree2b88ae6699b8a799f22ad971ce704fcc934b6dfc /compiler/rustc_infer/src
parent3d26f5a000426d695323e5e4bcf0a668a5101bc3 (diff)
downloadrust-efdf948f43a6416c2104430c53860d4f4032b812.tar.gz
rust-efdf948f43a6416c2104430c53860d4f4032b812.zip
use FxHashMap instead of BTreeMap
Diffstat (limited to 'compiler/rustc_infer/src')
-rw-r--r--compiler/rustc_infer/src/infer/mod.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index 30b75e9ae75..0e30b136622 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -33,7 +33,6 @@ use rustc_span::symbol::Symbol;
 use rustc_span::Span;
 
 use std::cell::{Cell, Ref, RefCell};
-use std::collections::BTreeMap;
 use std::fmt;
 
 use self::combine::CombineFields;
@@ -1532,14 +1531,14 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
             return inner;
         }
 
-        let mut region_map = BTreeMap::new();
+        let mut region_map = FxHashMap::default();
         let fld_r = |br: ty::BoundRegion| {
             *region_map
                 .entry(br)
                 .or_insert_with(|| self.next_region_var(LateBoundRegion(span, br.kind, lbrct)))
         };
 
-        let mut ty_map = BTreeMap::new();
+        let mut ty_map = FxHashMap::default();
         let fld_t = |bt: ty::BoundTy| {
             *ty_map.entry(bt).or_insert_with(|| {
                 self.next_ty_var(TypeVariableOrigin {
@@ -1548,7 +1547,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
                 })
             })
         };
-        let mut ct_map = BTreeMap::new();
+        let mut ct_map = FxHashMap::default();
         let fld_c = |bc: ty::BoundVar, ty| {
             *ct_map.entry(bc).or_insert_with(|| {
                 self.next_const_var(