Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37bf2d2

Browse files
committed
Delay the construction of early lint diag structs
Fixes a slew of perf regressions.
1 parent9f67c50 commit37bf2d2

File tree

2 files changed

+156
-231
lines changed

2 files changed

+156
-231
lines changed

‎compiler/rustc_lint/src/context.rs‎

Lines changed: 3 additions & 1 deletion
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)

[8]ページ先頭

©2009-2025 Movatter.jp