From 5449638d7d6b4f78b1f1fd6963eff35dd1a9705a Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 21 Dec 2023 12:30:36 +0100 Subject: [PATCH] Make iteration order of supported_target_features query stable --- compiler/rustc_codegen_ssa/src/target_features.rs | 4 ++-- compiler/rustc_middle/src/query/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs index 031fcc0adb1..b6bb1607a09 100644 --- a/compiler/rustc_codegen_ssa/src/target_features.rs +++ b/compiler/rustc_codegen_ssa/src/target_features.rs @@ -1,8 +1,8 @@ use crate::errors; use rustc_ast::ast; use rustc_attr::InstructionSetAttr; -use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxIndexSet; +use rustc_data_structures::unord::UnordMap; use rustc_errors::Applicability; use rustc_hir::def::DefKind; use rustc_hir::def_id::DefId; @@ -18,7 +18,7 @@ use rustc_span::Span; pub fn from_target_feature( tcx: TyCtxt<'_>, attr: &ast::Attribute, - supported_target_features: &FxHashMap>, + supported_target_features: &UnordMap>, target_features: &mut Vec, ) { let Some(list) = attr.meta_item_list() else { return }; diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 553a57961f0..7b97593bdc8 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -2082,7 +2082,7 @@ rustc_queries! { desc { "computing autoderef types for `{}`", goal.value.value } } - query supported_target_features(_: CrateNum) -> &'tcx FxHashMap> { + query supported_target_features(_: CrateNum) -> &'tcx UnordMap> { arena_cache eval_always desc { "looking up supported target features" }