diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-21 13:01:15 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-27 14:02:15 +0000 |
| commit | 5ae546e108957acc08bc3559106090f6cf6aee37 (patch) | |
| tree | 945cf8d6f8d636666a39854e8af245b421e395d4 | |
| parent | ae24fef028ca9b27c3209fca1229a99d45873774 (diff) | |
| download | rust-5ae546e108957acc08bc3559106090f6cf6aee37.tar.gz rust-5ae546e108957acc08bc3559106090f6cf6aee37.zip | |
Use FxIndexMap instead of BTreeMap to avoid sorting `DefId`s
| -rw-r--r-- | compiler/rustc_hir_analysis/src/outlives/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/outlives/utils.rs b/compiler/rustc_hir_analysis/src/outlives/utils.rs index 8077acea52e..d3bb22d715d 100644 --- a/compiler/rustc_hir_analysis/src/outlives/utils.rs +++ b/compiler/rustc_hir_analysis/src/outlives/utils.rs @@ -1,14 +1,14 @@ +use rustc_data_structures::fx::FxIndexMap; use rustc_infer::infer::outlives::components::{push_outlives_components, Component}; use rustc_middle::ty::{self, Region, Ty, TyCtxt}; use rustc_middle::ty::{GenericArg, GenericArgKind}; use rustc_span::Span; use smallvec::smallvec; -use std::collections::BTreeMap; /// Tracks the `T: 'a` or `'a: 'a` predicates that we have inferred /// must be added to the struct header. pub(crate) type RequiredPredicates<'tcx> = - BTreeMap<ty::OutlivesPredicate<GenericArg<'tcx>, ty::Region<'tcx>>, Span>; + FxIndexMap<ty::OutlivesPredicate<GenericArg<'tcx>, ty::Region<'tcx>>, Span>; /// Given a requirement `T: 'a` or `'b: 'a`, deduce the /// outlives_component and add it to `required_predicates` |
