@@ -19,6 +19,7 @@ use super::{CombinedSnapshot,
19
19
use super :: combine:: CombineFields ;
20
20
use super :: region_constraints:: { TaintDirections } ;
21
21
22
+ use std:: collections:: BTreeMap ;
22
23
use ty:: { self , TyCtxt , Binder , TypeFoldable } ;
23
24
use ty:: error:: TypeError ;
24
25
use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
@@ -246,7 +247,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
246
247
snapshot : & CombinedSnapshot ,
247
248
debruijn : ty:: DebruijnIndex ,
248
249
new_vars : & [ ty:: RegionVid ] ,
249
- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
250
+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
250
251
r0 : ty:: Region < ' tcx > )
251
252
-> ty:: Region < ' tcx > {
252
253
// Regions that pre-dated the LUB computation stay as they are.
@@ -342,7 +343,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
342
343
snapshot : & CombinedSnapshot ,
343
344
debruijn : ty:: DebruijnIndex ,
344
345
new_vars : & [ ty:: RegionVid ] ,
345
- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
346
+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
346
347
a_vars : & [ ty:: RegionVid ] ,
347
348
b_vars : & [ ty:: RegionVid ] ,
348
349
r0 : ty:: Region < ' tcx > )
@@ -411,7 +412,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
411
412
412
413
fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
413
414
span : Span ,
414
- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
415
+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
415
416
r : ty:: Region < ' tcx > ) -> ty:: Region < ' tcx >
416
417
{
417
418
for ( a_br, a_r) in a_map {
@@ -434,7 +435,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434
435
}
435
436
436
437
fn var_ids < ' a , ' gcx , ' tcx > ( fields : & CombineFields < ' a , ' gcx , ' tcx > ,
437
- map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > )
438
+ map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > )
438
439
-> Vec < ty:: RegionVid > {
439
440
map. iter ( )
440
441
. map ( |( _, & r) | match * r {
0 commit comments