diff options
| author | bors <bors@rust-lang.org> | 2022-07-16 08:48:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-16 08:48:36 +0000 |
| commit | e092d0b6b43f2de967af0887873151bb1c0b18d3 (patch) | |
| tree | 3c0903d6cb6800cbf43017141fc38b669a360386 /compiler/rustc_resolve/src | |
| parent | a8314ef7d0ec7b75c336af2c9857bfaf43002bfc (diff) | |
| parent | 647922f9d8a6f1fa639ab206e60a76d43cc9d3dd (diff) | |
| download | rust-e092d0b6b43f2de967af0887873151bb1c0b18d3.tar.gz rust-e092d0b6b43f2de967af0887873151bb1c0b18d3.zip | |
Auto merge of #99299 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.62.1
[stable] 1.62.1 release This bundles: * Windows: Fallback for overlapped I/O #98950 * don't succeed evaluate_obligation query if new opaque types were registered #98614 * Mitigate MMIO stale data vulnerability #98126 * Return a FxIndexSet in is_late_bound query. #99219 Also bumps the version number to 1.62.1 and includes a short release notes section for the release. r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late/lifetimes.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs index ff75e4eae35..9b4184840bd 100644 --- a/compiler/rustc_resolve/src/late/lifetimes.rs +++ b/compiler/rustc_resolve/src/late/lifetimes.rs @@ -8,7 +8,7 @@ use crate::late::diagnostics::{ForLifetimeSpanType, MissingLifetimeSpot}; use rustc_ast::walk_list; -use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap}; +use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap, FxIndexSet}; use rustc_errors::{struct_span_err, Applicability, Diagnostic}; use rustc_hir as hir; use rustc_hir::def::{DefKind, Res}; @@ -482,6 +482,11 @@ fn convert_named_region_map(tcx: TyCtxt<'_>, named_region_map: NamedRegionMap) - let def_id = tcx.hir().local_def_id(hir_id); map.insert(def_id); } + for (_, late_bound) in &mut rl.late_bound { + late_bound.sort_by(|&a, &b| { + tcx.def_path_hash(a.to_def_id()).cmp(&tcx.def_path_hash(b.to_def_id())) + }); + } for (hir_id, v) in named_region_map.late_bound_vars { let map = rl.late_bound_vars.entry(hir_id.owner).or_default(); map.insert(hir_id.local_id, v); @@ -540,7 +545,7 @@ fn item_for(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> LocalDefId { fn is_late_bound_map<'tcx>( tcx: TyCtxt<'tcx>, def_id: LocalDefId, -) -> Option<(LocalDefId, &'tcx FxHashSet<LocalDefId>)> { +) -> Option<(LocalDefId, &'tcx FxIndexSet<LocalDefId>)> { match tcx.def_kind(def_id) { DefKind::AnonConst | DefKind::InlineConst => { let mut def_id = tcx.local_parent(def_id); |
