Remove Partial/Ord
from BoundRegion
This commit is contained in:
parent
e87d10846e
commit
459ea32a27
6 changed files with 20 additions and 20 deletions
|
@ -431,7 +431,7 @@ pub struct BoundVarReplacer<'me, 'tcx> {
|
|||
// These three maps track the bound variable that were replaced by placeholders. It might be
|
||||
// nice to remove these since we already have the `kind` in the placeholder; we really just need
|
||||
// the `var` (but we *could* bring that into scope if we were to track them as we pass them).
|
||||
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>,
|
||||
// The current depth relative to *this* folding, *not* the entire normalization. In other words,
|
||||
|
@ -451,11 +451,12 @@ impl<'me, 'tcx> BoundVarReplacer<'me, 'tcx> {
|
|||
value: T,
|
||||
) -> (
|
||||
T,
|
||||
BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
FxIndexMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
BTreeMap<ty::PlaceholderConst, ty::BoundVar>,
|
||||
) {
|
||||
let mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion> = BTreeMap::new();
|
||||
let mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion> =
|
||||
FxIndexMap::default();
|
||||
let mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy> = FxIndexMap::default();
|
||||
let mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar> = BTreeMap::new();
|
||||
|
||||
|
@ -574,7 +575,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for BoundVarReplacer<'_, 'tcx> {
|
|||
/// The inverse of [`BoundVarReplacer`]: replaces placeholders with the bound vars from which they came.
|
||||
pub struct PlaceholderReplacer<'me, 'tcx> {
|
||||
infcx: &'me InferCtxt<'tcx>,
|
||||
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>,
|
||||
universe_indices: &'me [Option<ty::UniverseIndex>],
|
||||
|
@ -584,7 +585,7 @@ pub struct PlaceholderReplacer<'me, 'tcx> {
|
|||
impl<'me, 'tcx> PlaceholderReplacer<'me, 'tcx> {
|
||||
pub fn replace_placeholders<T: TypeFoldable<TyCtxt<'tcx>>>(
|
||||
infcx: &'me InferCtxt<'tcx>,
|
||||
mapped_regions: BTreeMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_regions: FxIndexMap<ty::PlaceholderRegion, ty::BoundRegion>,
|
||||
mapped_types: FxIndexMap<ty::PlaceholderType, ty::BoundTy>,
|
||||
mapped_consts: BTreeMap<ty::PlaceholderConst, ty::BoundVar>,
|
||||
universe_indices: &'me [Option<ty::UniverseIndex>],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue