@@ -24,7 +24,7 @@ use ty::{self, TyCtxt, Binder, TypeFoldable};
2424use ty:: error:: TypeError ;
2525use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
2626use syntax_pos:: Span ;
27- use util:: nodemap:: { FnvHashMap , FnvHashSet } ;
27+ use util:: nodemap:: { FxHashMap , FxHashSet } ;
2828
2929pub struct HrMatchResult < U > {
3030 pub value : U ,
@@ -135,7 +135,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
135135 // Map each skolemized region to a vector of other regions that it
136136 // must be equated with. (Note that this vector may include other
137137 // skolemized regions from `skol_map`.)
138- let skol_resolution_map: FnvHashMap < _ , _ > =
138+ let skol_resolution_map: FxHashMap < _ , _ > =
139139 skol_map
140140 . iter ( )
141141 . map ( |( & br, & skol) | {
@@ -158,7 +158,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
158158 // `skol_map`. There should always be a representative if things
159159 // are properly well-formed.
160160 let mut unconstrained_regions = vec ! [ ] ;
161- let skol_representatives: FnvHashMap < _ , _ > =
161+ let skol_representatives: FxHashMap < _ , _ > =
162162 skol_resolution_map
163163 . iter ( )
164164 . map ( |( & skol, & ( br, ref regions) ) | {
@@ -268,7 +268,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
268268 snapshot : & CombinedSnapshot ,
269269 debruijn : ty:: DebruijnIndex ,
270270 new_vars : & [ ty:: RegionVid ] ,
271- a_map : & FnvHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
271+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
272272 r0 : & ' tcx ty:: Region )
273273 -> & ' tcx ty:: Region {
274274 // Regions that pre-dated the LUB computation stay as they are.
@@ -364,8 +364,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
364364 snapshot : & CombinedSnapshot ,
365365 debruijn : ty:: DebruijnIndex ,
366366 new_vars : & [ ty:: RegionVid ] ,
367- a_map : & FnvHashMap < ty:: BoundRegion ,
368- & ' tcx ty:: Region > ,
367+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
369368 a_vars : & [ ty:: RegionVid ] ,
370369 b_vars : & [ ty:: RegionVid ] ,
371370 r0 : & ' tcx ty:: Region )
@@ -434,7 +433,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434433
435434 fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
436435 span : Span ,
437- a_map : & FnvHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
436+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
438437 r : & ' tcx ty:: Region ) -> & ' tcx ty:: Region
439438 {
440439 for ( a_br, a_r) in a_map {
@@ -457,7 +456,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
457456}
458457
459458fn var_ids < ' a , ' gcx , ' tcx > ( fields : & CombineFields < ' a , ' gcx , ' tcx > ,
460- map : & FnvHashMap < ty:: BoundRegion , & ' tcx ty:: Region > )
459+ map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > )
461460 -> Vec < ty:: RegionVid > {
462461 map. iter ( )
463462 . map ( |( _, & r) | match * r {
@@ -504,7 +503,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
504503 snapshot : & CombinedSnapshot ,
505504 r : & ' tcx ty:: Region ,
506505 directions : TaintDirections )
507- -> FnvHashSet < & ' tcx ty:: Region > {
506+ -> FxHashSet < & ' tcx ty:: Region > {
508507 self . region_vars . tainted ( & snapshot. region_vars_snapshot , r, directions)
509508 }
510509
@@ -568,7 +567,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
568567 let escaping_types =
569568 self . type_variables . borrow_mut ( ) . types_escaping_snapshot ( & snapshot. type_snapshot ) ;
570569
571- let mut escaping_region_vars = FnvHashSet ( ) ;
570+ let mut escaping_region_vars = FxHashSet ( ) ;
572571 for ty in & escaping_types {
573572 self . tcx . collect_regions ( ty, & mut escaping_region_vars) ;
574573 }
@@ -764,7 +763,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
764763 // region back to the `ty::BoundRegion` that it originally
765764 // represented. Because `leak_check` passed, we know that
766765 // these taint sets are mutually disjoint.
767- let inv_skol_map: FnvHashMap < & ' tcx ty:: Region , ty:: BoundRegion > =
766+ let inv_skol_map: FxHashMap < & ' tcx ty:: Region , ty:: BoundRegion > =
768767 skol_map
769768 . iter ( )
770769 . flat_map ( |( & skol_br, & skol) | {
@@ -837,7 +836,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
837836 snapshot : & CombinedSnapshot )
838837 {
839838 debug ! ( "pop_skolemized({:?})" , skol_map) ;
840- let skol_regions: FnvHashSet < _ > = skol_map. values ( ) . cloned ( ) . collect ( ) ;
839+ let skol_regions: FxHashSet < _ > = skol_map. values ( ) . cloned ( ) . collect ( ) ;
841840 self . region_vars . pop_skolemized ( & skol_regions, & snapshot. region_vars_snapshot ) ;
842841 if !skol_map. is_empty ( ) {
843842 self . projection_cache . borrow_mut ( ) . rollback_skolemized (
0 commit comments