Make Span optional in BufferedEarlyLint

This commit is contained in:
Urgau
2024-06-22 12:38:10 +02:00
parent 6a2cd0d50c
commit eedb32dd12
5 changed files with 31 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ impl<'a, T: EarlyLintPass> EarlyContextAndPass<'a, T> {
fn inlined_check_id(&mut self, id: ast::NodeId) {
for early_lint in self.context.buffered.take(id) {
let BufferedEarlyLint { span, node_id: _, lint_id, diagnostic } = early_lint;
self.context.span_lint_with_diagnostics(lint_id.lint, span, diagnostic);
self.context.opt_span_lint_with_diagnostics(lint_id.lint, span, diagnostic);
}
}