Convert uses of BuiltinLintDiag::Normal to custom variants
This ensures all diagnostic messages are created at diagnostic emission time, making them translatable.
This commit is contained in:
parent
41a20b4c56
commit
b7abf014ec
20 changed files with 295 additions and 173 deletions
|
@ -300,23 +300,6 @@ impl ParseSess {
|
|||
self.source_map.clone()
|
||||
}
|
||||
|
||||
pub fn buffer_lint(
|
||||
&self,
|
||||
lint: &'static Lint,
|
||||
span: impl Into<MultiSpan>,
|
||||
node_id: NodeId,
|
||||
msg: impl Into<DiagMessage>,
|
||||
) {
|
||||
self.buffered_lints.with_lock(|buffered_lints| {
|
||||
buffered_lints.push(BufferedEarlyLint {
|
||||
span: span.into(),
|
||||
node_id,
|
||||
lint_id: LintId::of(lint),
|
||||
diagnostic: BuiltinLintDiag::Normal(msg.into()),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
pub fn buffer_lint_with_diagnostic(
|
||||
&self,
|
||||
lint: &'static Lint,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue