From c227f35a9cd7ef894abfb623a16ad28abf8b6e3f Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sun, 14 Apr 2024 17:59:54 +0000 Subject: 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. --- compiler/rustc_interface/src/util.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'compiler/rustc_interface/src/util.rs') diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index ce2382b9501..de7005a541b 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -409,7 +409,6 @@ pub(crate) fn check_attr_crate_type( lint::builtin::UNKNOWN_CRATE_TYPES, ast::CRATE_NODE_ID, span, - "invalid `crate_type` value", BuiltinLintDiag::UnknownCrateTypes( span, "did you mean".to_string(), -- cgit 1.4.1-3-g733a5