about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-24 09:36:29 +0000
committerbors <bors@rust-lang.org>2022-09-24 09:36:29 +0000
commitbb5a01617589b5e3ece5a36435fc285bfd13c9a4 (patch)
tree7f58d400afb27079579bb5514eb71eff84f15967 /compiler/rustc_errors
parent199fe1d169b5aeeca0e527ded26542b7a05ebd79 (diff)
parentfc43df0333d5862a219f16d294ae38b14b9191d3 (diff)
downloadrust-bb5a01617589b5e3ece5a36435fc285bfd13c9a4.tar.gz
rust-bb5a01617589b5e3ece5a36435fc285bfd13c9a4.zip
Auto merge of #102064 - cjgillot:revert, r=Mark-Simulacrum
Revert perf-regression 101620

Reverts #101862 #101620

r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_errors')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs5
-rw-r--r--compiler/rustc_errors/src/lib.rs2
2 files changed, 3 insertions, 4 deletions
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(_))