Compute lint_levels
by definition
This commit is contained in:
parent
c97922dca5
commit
eb19a8a620
13 changed files with 482 additions and 332 deletions
|
@ -338,9 +338,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;
|
||||
|
|
|
@ -1167,7 +1167,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(_))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue