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:
parent
fcfe05aa75
commit
231dbbcb6a
4 changed files with 23 additions and 23 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue