1
- use std:: collections:: { BTreeMap , VecDeque } ;
1
+ use std:: collections:: VecDeque ;
2
2
3
3
use rustc_data_structures:: fx:: { FxHashSet , FxIndexMap } ;
4
4
use rustc_hir:: LangItem ;
@@ -219,7 +219,7 @@ pub struct BoundVarReplacer<'a, 'tcx> {
219
219
// the `var` (but we *could* bring that into scope if we were to track them as we pass them).
220
220
mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
221
221
mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
222
- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
222
+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
223
223
// The current depth relative to *this* folding, *not* the entire normalization. In other words,
224
224
// the depth of binders we've passed here.
225
225
current_index : ty:: DebruijnIndex ,
@@ -239,12 +239,12 @@ impl<'a, 'tcx> BoundVarReplacer<'a, 'tcx> {
239
239
T ,
240
240
FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
241
241
FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
242
- BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
242
+ FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
243
243
) {
244
244
let mapped_regions: FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > =
245
245
FxIndexMap :: default ( ) ;
246
246
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 ( ) ;
248
248
249
249
let mut replacer = BoundVarReplacer {
250
250
infcx,
@@ -363,7 +363,7 @@ pub struct PlaceholderReplacer<'a, 'tcx> {
363
363
infcx : & ' a InferCtxt < ' tcx > ,
364
364
mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
365
365
mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
366
- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
366
+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
367
367
universe_indices : & ' a [ Option < ty:: UniverseIndex > ] ,
368
368
current_index : ty:: DebruijnIndex ,
369
369
}
@@ -373,7 +373,7 @@ impl<'a, 'tcx> PlaceholderReplacer<'a, 'tcx> {
373
373
infcx : & ' a InferCtxt < ' tcx > ,
374
374
mapped_regions : FxIndexMap < ty:: PlaceholderRegion , ty:: BoundRegion > ,
375
375
mapped_types : FxIndexMap < ty:: PlaceholderType , ty:: BoundTy > ,
376
- mapped_consts : BTreeMap < ty:: PlaceholderConst , ty:: BoundVar > ,
376
+ mapped_consts : FxIndexMap < ty:: PlaceholderConst , ty:: BoundVar > ,
377
377
universe_indices : & ' a [ Option < ty:: UniverseIndex > ] ,
378
378
value : T ,
379
379
) -> T {
0 commit comments