@@ -19,6 +19,7 @@ use super::{CombinedSnapshot,
1919use super :: combine:: CombineFields ;
2020use super :: region_constraints:: { TaintDirections } ;
2121
22+ use std:: collections:: BTreeMap ;
2223use ty:: { self , TyCtxt , Binder , TypeFoldable } ;
2324use ty:: error:: TypeError ;
2425use ty:: relate:: { Relate , RelateResult , TypeRelation } ;
@@ -246,7 +247,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
246247 snapshot : & CombinedSnapshot ,
247248 debruijn : ty:: DebruijnIndex ,
248249 new_vars : & [ ty:: RegionVid ] ,
249- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
250+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
250251 r0 : ty:: Region < ' tcx > )
251252 -> ty:: Region < ' tcx > {
252253 // Regions that pre-dated the LUB computation stay as they are.
@@ -342,7 +343,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
342343 snapshot : & CombinedSnapshot ,
343344 debruijn : ty:: DebruijnIndex ,
344345 new_vars : & [ ty:: RegionVid ] ,
345- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
346+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
346347 a_vars : & [ ty:: RegionVid ] ,
347348 b_vars : & [ ty:: RegionVid ] ,
348349 r0 : ty:: Region < ' tcx > )
@@ -411,7 +412,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
411412
412413 fn rev_lookup < ' a , ' gcx , ' tcx > ( infcx : & InferCtxt < ' a , ' gcx , ' tcx > ,
413414 span : Span ,
414- a_map : & FxHashMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
415+ a_map : & BTreeMap < ty:: BoundRegion , ty:: Region < ' tcx > > ,
415416 r : ty:: Region < ' tcx > ) -> ty:: Region < ' tcx >
416417 {
417418 for ( a_br, a_r) in a_map {
@@ -434,7 +435,7 @@ impl<'a, 'gcx, 'tcx> CombineFields<'a, 'gcx, 'tcx> {
434435}
435436
436437fn 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 > > )
438439 -> Vec < ty:: RegionVid > {
439440 map. iter ( )
440441 . map ( |( _, & r) | match * r {
0 commit comments