1- use std:: collections:: { BTreeMap , VecDeque } ;
1+ use std:: collections:: VecDeque ;
22
33use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap } ;
44use rustc_hir:: LangItem ;
@@ -219,7 +219,7 @@ pub struct BoundVarReplacer<'a, 'tcx> {
219219 // the `var` (but we *could* bring that into scope if we were to track them as we pass them).
220220 mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
221221 mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
222- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
222+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
223223 // The current depth relative to *this* folding, *not* the entire normalization. In other words,
224224 // the depth of binders we've passed here.
225225 current_index : ty:: DebruijnIndex ,
@@ -239,12 +239,12 @@ impl<'a, 'tcx> BoundVarReplacer<'a, 'tcx> {
239239 T ,
240240 FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
241241 FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
242- BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
242+ FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
243243 ) {
244244 let mapped_regions: FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > =
245245 FxIndexMap :: default ( ) ;
246246 let mapped_types: FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > = FxIndexMap :: default ( ) ;
247- let mapped_consts: BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > = BTreeMap :: new ( ) ;
247+ let mapped_consts: FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > = FxIndexMap :: default ( ) ;
248248
249249 let mut replacer = BoundVarReplacer {
250250 infcx,
@@ -363,7 +363,7 @@ pub struct PlaceholderReplacer<'a, 'tcx> {
363363 infcx : & ' a InferCtxt < ' tcx > ,
364364 mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
365365 mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
366- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
366+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
367367 universe_indices : & ' a [ Option < ty:: UniverseIndex > ] ,
368368 current_index : ty:: DebruijnIndex ,
369369}
@@ -373,7 +373,7 @@ impl<'a, 'tcx> PlaceholderReplacer<'a, 'tcx> {
373373 infcx : & ' a InferCtxt < ' tcx > ,
374374 mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
375375 mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
376- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
376+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
377377 universe_indices : & ' a [ Option < ty:: UniverseIndex > ] ,
378378 value : T ,
379379 ) -> T {
0 commit comments