Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5ae546e

Browse files
committed
Use FxIndexMap instead of BTreeMap to avoid sorting DefIds
1 parent ae24fef commit 5ae546e

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_hir_analysis/src/outlives

1 file changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/outlives/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
use rustc_data_structures::fx::FxIndexMap;
12
use rustc_infer::infer::outlives::components::{push_outlives_components, Component};
23
use rustc_middle::ty::{self, Region, Ty, TyCtxt};
34
use rustc_middle::ty::{GenericArg, GenericArgKind};
45
use rustc_span::Span;
56
use smallvec::smallvec;
6-
use std::collections::BTreeMap;
77

88
/// Tracks the `T: 'a` or `'a: 'a` predicates that we have inferred
99
/// must be added to the struct header.
1010
pub(crate) type RequiredPredicates<'tcx> =
11-
BTreeMap<ty::OutlivesPredicate<GenericArg<'tcx>, ty::Region<'tcx>>, Span>;
11+
FxIndexMap<ty::OutlivesPredicate<GenericArg<'tcx>, ty::Region<'tcx>>, Span>;
1212

1313
/// Given a requirement `T: 'a` or `'b: 'a`, deduce the
1414
/// outlives_component and add it to `required_predicates`

0 commit comments

Comments
 (0)