about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/expect.rs4
-rw-r--r--compiler/rustc_lint/src/levels.rs10
2 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_lint/src/expect.rs b/compiler/rustc_lint/src/expect.rs
index 7611b41b97e..e6c9d0b0ab0 100644
--- a/compiler/rustc_lint/src/expect.rs
+++ b/compiler/rustc_lint/src/expect.rs
@@ -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) {
diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs
index f40abff7fc0..f46f74fa45f 100644
--- a/compiler/rustc_lint/src/levels.rs
+++ b/compiler/rustc_lint/src/levels.rs
@@ -45,7 +45,7 @@ fn lint_levels(tcx: TyCtxt<'_>, (): ()) -> LintLevelMap {
 
 pub struct LintLevelsBuilder<'s> {
     sess: &'s Session,
-    lint_expectations: FxHashMap<LintExpectationId, LintExpectation>,
+    lint_expectations: Vec<(LintExpectationId, LintExpectation)>,
     /// Each expectation has a stable and an unstable identifier. This map
     /// is used to map from unstable to stable [`LintExpectationId`]s.
     expectation_id_map: FxHashMap<LintExpectationId, LintExpectationId>,
@@ -355,7 +355,7 @@ impl<'s> LintLevelsBuilder<'s> {
                         }
                         if let Level::Expect(expect_id) = level {
                             self.lint_expectations
-                                .insert(expect_id, LintExpectation::new(reason, sp));
+                                .push((expect_id, LintExpectation::new(reason, sp)));
                         }
                     }
 
@@ -374,7 +374,7 @@ impl<'s> LintLevelsBuilder<'s> {
                                 }
                                 if let Level::Expect(expect_id) = level {
                                     self.lint_expectations
-                                        .insert(expect_id, LintExpectation::new(reason, sp));
+                                        .push((expect_id, LintExpectation::new(reason, sp)));
                                 }
                             }
                             Err((Some(ids), ref new_lint_name)) => {
@@ -414,7 +414,7 @@ impl<'s> LintLevelsBuilder<'s> {
                                 }
                                 if let Level::Expect(expect_id) = level {
                                     self.lint_expectations
-                                        .insert(expect_id, LintExpectation::new(reason, sp));
+                                        .push((expect_id, LintExpectation::new(reason, sp)));
                                 }
                             }
                             Err((None, _)) => {
@@ -511,7 +511,7 @@ impl<'s> LintLevelsBuilder<'s> {
                         }
                         if let Level::Expect(expect_id) = level {
                             self.lint_expectations
-                                .insert(expect_id, LintExpectation::new(reason, sp));
+                                .push((expect_id, LintExpectation::new(reason, sp)));
                         }
                     } else {
                         panic!("renamed lint does not exist: {}", new_name);