From fc43df0333d5862a219f16d294ae38b14b9191d3 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 20 Sep 2022 20:04:35 +0200 Subject: Revert "Auto merge of #101620 - cjgillot:compute_lint_levels_by_def, r=oli-obk" This reverts commit 2cb9a65684dba47c52de8fa938febf97a73e70a9, reversing changes made to 750bd1a7ff3e010611b97ee75d30b7cbf5f3a03c. --- compiler/rustc_errors/src/diagnostic.rs | 5 ++--- compiler/rustc_errors/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_errors/src') diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index a52e95e92d5..1c440a0a07e 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -339,10 +339,9 @@ impl Diagnostic { // The lint index inside the attribute is manually transferred here. let lint_index = expectation_id.get_lint_index(); expectation_id.set_lint_index(None); - let mut stable_id = unstable_to_stable + let mut stable_id = *unstable_to_stable .get(&expectation_id) - .expect("each unstable `LintExpectationId` must have a matching stable id") - .normalize(); + .expect("each unstable `LintExpectationId` must have a matching stable id"); stable_id.set_lint_index(lint_index); *expectation_id = stable_id; diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 68971cebc35..b44cf352233 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1205,7 +1205,7 @@ impl HandlerInner { if let Some(expectation_id) = diagnostic.level.get_expectation_id() { self.suppressed_expected_diag = true; - self.fulfilled_expectations.insert(expectation_id.normalize()); + self.fulfilled_expectations.insert(expectation_id); } if matches!(diagnostic.level, Warning(_)) -- cgit 1.4.1-3-g733a5