Make iteration order of supported_target_features query stable

This commit is contained in:
Michael Woerister 2023-12-21 12:30:36 +01:00
parent 7d4f2ee817
commit 5449638d7d
2 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
use crate::errors; use crate::errors;
use rustc_ast::ast; use rustc_ast::ast;
use rustc_attr::InstructionSetAttr; use rustc_attr::InstructionSetAttr;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::fx::FxIndexSet; use rustc_data_structures::fx::FxIndexSet;
use rustc_data_structures::unord::UnordMap;
use rustc_errors::Applicability; use rustc_errors::Applicability;
use rustc_hir::def::DefKind; use rustc_hir::def::DefKind;
use rustc_hir::def_id::DefId; use rustc_hir::def_id::DefId;
@ -18,7 +18,7 @@ use rustc_span::Span;
pub fn from_target_feature( pub fn from_target_feature(
tcx: TyCtxt<'_>, tcx: TyCtxt<'_>,
attr: &ast::Attribute, attr: &ast::Attribute,
supported_target_features: &FxHashMap<String, Option<Symbol>>, supported_target_features: &UnordMap<String, Option<Symbol>>,
target_features: &mut Vec<Symbol>, target_features: &mut Vec<Symbol>,
) { ) {
let Some(list) = attr.meta_item_list() else { return }; let Some(list) = attr.meta_item_list() else { return };

View File

@ -2082,7 +2082,7 @@ rustc_queries! {
desc { "computing autoderef types for `{}`", goal.value.value } desc { "computing autoderef types for `{}`", goal.value.value }
} }
query supported_target_features(_: CrateNum) -> &'tcx FxHashMap<String, Option<Symbol>> { query supported_target_features(_: CrateNum) -> &'tcx UnordMap<String, Option<Symbol>> {
arena_cache arena_cache
eval_always eval_always
desc { "looking up supported target features" } desc { "looking up supported target features" }