about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/diagnostic.rs
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2023-12-31 13:04:43 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2023-12-31 14:35:28 +0100
commit231dbbcb6ac0bc32e77dd7f3bf0443f493161c65 (patch)
treeaa217b9b3fb461e03ce90db52f37990b191b33b2 /compiler/rustc_errors/src/diagnostic.rs
parentfcfe05aa7538fbb18fc3baff9aabdf9a1cd14b1e (diff)
downloadrust-231dbbcb6ac0bc32e77dd7f3bf0443f493161c65.tar.gz
rust-231dbbcb6ac0bc32e77dd7f3bf0443f493161c65.zip
rustc_lint: Make `LintLevelsProvider::current_specs()` return `&FxIndexMap`
So that lint iteration order becomes predicitable. Discovered with
`rustc::potential_query_instability`.
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic.rs')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index c226b2d41bd..49431fb7b3f 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -3,7 +3,7 @@ use crate::{
     CodeSuggestion, DiagnosticBuilder, DiagnosticMessage, EmissionGuarantee, Level, MultiSpan,
     SubdiagnosticMessage, Substitution, SubstitutionPart, SuggestionStyle,
 };
-use rustc_data_structures::fx::FxHashMap;
+use rustc_data_structures::fx::{FxHashMap, FxIndexMap};
 use rustc_error_messages::fluent_value_from_str_list_sep_by_and;
 use rustc_error_messages::FluentValue;
 use rustc_lint_defs::{Applicability, LintExpectationId};
@@ -259,7 +259,7 @@ impl Diagnostic {
 
     pub(crate) fn update_unstable_expectation_id(
         &mut self,
-        unstable_to_stable: &FxHashMap<LintExpectationId, LintExpectationId>,
+        unstable_to_stable: &FxIndexMap<LintExpectationId, LintExpectationId>,
     ) {
         if let Level::Expect(expectation_id) | Level::Warning(Some(expectation_id)) =
             &mut self.level