Skip to content

Commit

Permalink
Delay construction of early lint diag structs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmease committed May 22, 2024
1 parent cee92a9 commit cf71de0
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 231 deletions.
4 changes: 3 additions & 1 deletion compiler/rustc_lint/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,9 @@ impl EarlyContext<'_> {
span: MultiSpan,
diagnostic: BuiltinLintDiag,
) {
diagnostics::emit_buffered_lint(self, lint, span, diagnostic)
self.opt_span_lint(lint, Some(span), |diag| {
diagnostics::decorate_lint(self.sess(), diagnostic, diag);
});
}
}

Expand Down
Loading

0 comments on commit cf71de0

Please sign in to comment.