Skip to content

Commit ca47bd3

Browse files
committed
Delay construction of early lint diag structs
1 parent 265f936 commit ca47bd3

File tree

2 files changed

+156
-231
lines changed

2 files changed

+156
-231
lines changed

compiler/rustc_lint/src/context.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,9 @@ impl EarlyContext<'_> {
539539
span: MultiSpan,
540540
diagnostic: BuiltinLintDiag,
541541
) {
542-
diagnostics::emit_buffered_lint(self, lint, span, diagnostic)
542+
self.opt_span_lint(lint, Some(span), |diag| {
543+
diagnostics::decorate_lint(self.sess(), diagnostic, diag);
544+
});
543545
}
544546
}
545547

0 commit comments

Comments
 (0)