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:
@@ -786,7 +786,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||
LEGACY_DERIVE_HELPERS,
|
||||
node_id,
|
||||
ident.span,
|
||||
"derive helper attribute is used before it is introduced",
|
||||
BuiltinLintDiag::LegacyDeriveHelpers(binding.span),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user