Auto merge of #124417 - Xiretza:translate-early-lints, r=fmease

Make early lints translatable

<del>Requires https://github.com/projectfluent/fluent-rs/pull/353.</del> 5134a04eaa

r? diagnostics
This commit is contained in:
bors 2024-05-21 21:36:09 +00:00
commit 791adf759c
80 changed files with 2114 additions and 907 deletions

View file

@ -1913,11 +1913,10 @@ impl<'a> Parser<'a> {
| ExprKind::Block(_, None)
)
{
self.psess.buffer_lint_with_diagnostic(
self.psess.buffer_lint(
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),
);
}