diff options
| author | bors <bors@rust-lang.org> | 2022-10-01 19:54:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-01 19:54:55 +0000 |
| commit | 57f097ea25f2c05f424fc9b9dc50dbd6d399845c (patch) | |
| tree | 54b2bb2968147e1c6c3e422a18622192334d2ba7 /compiler/rustc_errors | |
| parent | 56a35bc906be1250a76fdb9a4b70e9261e10aec5 (diff) | |
| parent | fec53fd9db276d34d8d17701aeb3e81576d761fe (diff) | |
| download | rust-57f097ea25f2c05f424fc9b9dc50dbd6d399845c.tar.gz rust-57f097ea25f2c05f424fc9b9dc50dbd6d399845c.zip | |
Auto merge of #102236 - cjgillot:compute_lint_levels_by_def, r=oli-obk
Compute lint levels by definition Second attempt to https://github.com/rust-lang/rust/pull/101620. I think that I have removed the perf regression.
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 49dcc2ba021..31e410aaaf0 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -364,9 +364,10 @@ 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"); + .expect("each unstable `LintExpectationId` must have a matching stable id") + .normalize(); 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 c8711ec6e25..7c312da6279 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -1211,7 +1211,7 @@ impl HandlerInner { if let Some(expectation_id) = diagnostic.level.get_expectation_id() { self.suppressed_expected_diag = true; - self.fulfilled_expectations.insert(expectation_id); + self.fulfilled_expectations.insert(expectation_id.normalize()); } if matches!(diagnostic.level, Warning(_)) |
