diff --git a/compiler/rustc_data_structures/src/unord.rs b/compiler/rustc_data_structures/src/unord.rs index 476ea432a0c95..bd4dff6f62fff 100644 --- a/compiler/rustc_data_structures/src/unord.rs +++ b/compiler/rustc_data_structures/src/unord.rs @@ -159,6 +159,7 @@ impl> UnordItems { self.collect_stable_ord_by_key(project_to_key) } + #[inline] pub fn collect_sorted(self, hcx: &HCX, cache_sort_key: bool) -> C where T: ToStableHashKey, @@ -178,6 +179,7 @@ impl> UnordItems { items } + #[inline] pub fn collect_stable_ord_by_key(self, project_to_key: P) -> C where K: StableCompare, diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index adf4c231f78e6..18b9ba0f042df 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -1052,8 +1052,6 @@ pub fn check_unused_or_stable_features(tcx: TyCtxt<'_>) { tcx.dcx().emit_err(errors::UnknownFeature { span, feature: *feature }); } - // We only use the hash map contents to emit errors, and the order of - // emitted errors do not affect query stability. for (&implied_by, &feature) in remaining_implications.to_sorted_stable_ord() { let local_defined_features = tcx.lib_features(LOCAL_CRATE); let span = local_defined_features