Compute lint_levels by definition

This commit is contained in:
Deadbeef
2022-07-22 16:48:36 +00:00
committed by Camille GILLOT
parent 6019cbbfd3
commit 3cb1811e45
13 changed files with 482 additions and 334 deletions

View File

@@ -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;