rustc_lint: Make LintLevelsProvider::current_specs() return &FxIndexMap
So that lint iteration order becomes predicitable. Discovered with `rustc::potential_query_instability`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::cmp;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_data_structures::sorted_map::SortedMap;
|
||||
use rustc_errors::{Diagnostic, DiagnosticBuilder, DiagnosticId, DiagnosticMessage, MultiSpan};
|
||||
use rustc_hir::{HirId, ItemLocalId};
|
||||
@@ -61,7 +61,7 @@ pub type LevelAndSource = (Level, LintLevelSource);
|
||||
/// by the attributes for *a single HirId*.
|
||||
#[derive(Default, Debug, HashStable)]
|
||||
pub struct ShallowLintLevelMap {
|
||||
pub specs: SortedMap<ItemLocalId, FxHashMap<LintId, LevelAndSource>>,
|
||||
pub specs: SortedMap<ItemLocalId, FxIndexMap<LintId, LevelAndSource>>,
|
||||
}
|
||||
|
||||
/// From an initial level and source, verify the effect of special annotations:
|
||||
|
||||
Reference in New Issue
Block a user