Skip to content

Commit c6d6358

Browse files
Don't use BTreeMap for mapped_consts
1 parent 573a015 commit c6d6358

File tree

1 file changed

+6
-6
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+6
-6
lines changed

compiler/rustc_trait_selection/src/traits/util.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::collections::{BTreeMap, VecDeque};
1+
use std::collections::VecDeque;
22

33
use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
44
use 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

Comments
 (0)