@@ -24,7 +24,7 @@ use ty::{self, TyCtxt, Binder, TypeFoldable};
24
24
use ty:: error:: TypeError ;
25
25
use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
26
26
use syntax_pos:: Span ;
27
- use util:: nodemap:: { FnvHashMap , FnvHashSet } ;
27
+ use util:: nodemap:: { FxHashMap , FxHashSet } ;
28
28
29
29
pub struct HrMatchResult < U > {
30
30
pub value : U ,
@@ -135,7 +135,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
135
135
// Map each skolemized region to a vector of other regions that it
136
136
// must be equated with. (Note that this vector may include other
137
137
// skolemized regions from `skol_map`.)
138
- let skol_resolution_map: FnvHashMap < _ , _ > =
138
+ let skol_resolution_map: FxHashMap < _ , _ > =
139
139
skol_map
140
140
. iter ( )
141
141
. map ( |( & br, & skol) | {
@@ -158,7 +158,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
158
158
// `skol_map`. There should always be a representative if things
159
159
// are properly well-formed.
160
160
let mut unconstrained_regions = vec ! [ ] ;
161
- let skol_representatives: FnvHashMap < _ , _ > =
161
+ let skol_representatives: FxHashMap < _ , _ > =
162
162
skol_resolution_map
163
163
. iter ( )
164
164
. map ( |( & skol, & ( br, ref regions) ) | {
@@ -268,7 +268,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
268
268
snapshot : & CombinedSnapshot ,
269
269
debruijn : ty:: DebruijnIndex ,
270
270
new_vars : & [ ty:: RegionVid ] ,
271
- a_map : & FnvHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
271
+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
272
272
r0 : & ' tcx ty:: Region )
273
273
-> & ' tcx ty:: Region {
274
274
// Regions that pre-dated the LUB computation stay as they are.
@@ -364,8 +364,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
364
364
snapshot : & CombinedSnapshot ,
365
365
debruijn : ty:: DebruijnIndex ,
366
366
new_vars : & [ ty:: RegionVid ] ,
367
- a_map : & FnvHashMap < ty:: BoundRegion ,
368
- & ' tcx ty:: Region > ,
367
+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
369
368
a_vars : & [ ty:: RegionVid ] ,
370
369
b_vars : & [ ty:: RegionVid ] ,
371
370
r0 : & ' tcx ty:: Region )
@@ -434,7 +433,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434
433
435
434
fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
436
435
span : Span ,
437
- a_map : & FnvHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
436
+ a_map : & FxHashMap < ty:: BoundRegion , & ' tcx ty:: Region > ,
438
437
r : & ' tcx ty:: Region ) -> & ' tcx ty:: Region
439
438
{
440
439
for ( a_br, a_r) in a_map {
@@ -457,7 +456,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
457
456
}
458
457
459
458
fn 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 > )
461
460
-> Vec < ty:: RegionVid > {
462
461
map. iter ( )
463
462
. map ( |( _, & r) | match * r {
@@ -504,7 +503,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
504
503
snapshot : & CombinedSnapshot ,
505
504
r : & ' tcx ty:: Region ,
506
505
directions : TaintDirections )
507
- -> FnvHashSet < & ' tcx ty:: Region > {
506
+ -> FxHashSet < & ' tcx ty:: Region > {
508
507
self . region_vars . tainted ( & snapshot. region_vars_snapshot , r, directions)
509
508
}
510
509
@@ -568,7 +567,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
568
567
let escaping_types =
569
568
self . type_variables . borrow_mut ( ) . types_escaping_snapshot ( & snapshot. type_snapshot ) ;
570
569
571
- let mut escaping_region_vars = FnvHashSet ( ) ;
570
+ let mut escaping_region_vars = FxHashSet ( ) ;
572
571
for ty in & escaping_types {
573
572
self . tcx . collect_regions ( ty, & mut escaping_region_vars) ;
574
573
}
@@ -764,7 +763,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
764
763
// region back to the `ty::BoundRegion` that it originally
765
764
// represented. Because `leak_check` passed, we know that
766
765
// 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 > =
768
767
skol_map
769
768
. iter ( )
770
769
. flat_map ( |( & skol_br, & skol) | {
@@ -837,7 +836,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
837
836
snapshot : & CombinedSnapshot )
838
837
{
839
838
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 ( ) ;
841
840
self . region_vars . pop_skolemized ( & skol_regions, & snapshot. region_vars_snapshot ) ;
842
841
if !skol_map. is_empty ( ) {
843
842
self . projection_cache . borrow_mut ( ) . rollback_skolemized (
0 commit comments