Generate lint diagnostic message from BuiltinLintDiag
Translation of the lint message happens when the actual diagnostic is created, not when the lint is buffered. Generating the message from BuiltinLintDiag ensures that all required data to construct the message is preserved in the LintBuffer, eventually allowing the messages to be moved to fluent. Remove the `msg` field from BufferedEarlyLint, it is either generated from the data in the BuiltinLintDiag or stored inside BuiltinLintDiag::Normal.
This commit is contained in:
@@ -1917,7 +1917,6 @@ impl<'a> Parser<'a> {
|
||||
BREAK_WITH_LABEL_AND_LOOP,
|
||||
lo.to(expr.span),
|
||||
ast::CRATE_NODE_ID,
|
||||
"this labeled break expression is easy to confuse with an unlabeled break with a labeled value expression",
|
||||
BuiltinLintDiag::BreakWithLabelAndLoop(expr.span),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user