1
Fork 0

Use Vec for expectations to have a constant order (RFC-2383)

This commit is contained in:
xFrednet 2022-03-02 18:10:07 +01:00
parent defc056ccc
commit 5275d02433
No known key found for this signature in database
GPG key ID: FCDCBF29AF64D601
6 changed files with 31 additions and 33 deletions

View file

@ -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) {