Use Vec for expectations to have a constant order (RFC-2383)
This commit is contained in:
parent
defc056ccc
commit
5275d02433
6 changed files with 31 additions and 33 deletions
|
@ -1,5 +1,4 @@
|
|||
use crate::builtin;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::HirId;
|
||||
use rustc_middle::{lint::LintExpectation, ty::TyCtxt};
|
||||
use rustc_session::lint::LintExpectationId;
|
||||
|
@ -11,8 +10,7 @@ pub fn check_expectations(tcx: TyCtxt<'_>) {
|
|||
}
|
||||
|
||||
let fulfilled_expectations = tcx.sess.diagnostic().steal_fulfilled_expectation_ids();
|
||||
let lint_expectations: &FxHashMap<LintExpectationId, LintExpectation> =
|
||||
&tcx.lint_levels(()).lint_expectations;
|
||||
let lint_expectations = &tcx.lint_levels(()).lint_expectations;
|
||||
|
||||
for (id, expectation) in lint_expectations {
|
||||
if !fulfilled_expectations.contains(id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue