Skip to content

Commit 1373074

Browse files
committed
rustc_expand: make a message translatable
1 parent fbc2459 commit 1373074

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compiler/rustc_expand/messages.ftl

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ expand_module_multiple_candidates =
129129
expand_must_repeat_once =
130130
this must repeat at least once
131131
132+
expand_non_inline_modules_in_proc_macro_input_are_unstable =
133+
non-inline modules in proc macro input are unstable
134+
132135
expand_not_a_meta_item =
133136
not a meta item
134137

compiler/rustc_expand/src/expand.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ use crate::errors::{
3939
RecursionLimitReached, RemoveExprNotSupported, RemoveNodeNotSupported, UnsupportedKeyValue,
4040
WrongFragmentKind,
4141
};
42+
use crate::fluent_generated;
4243
use crate::mbe::diagnostics::annotate_err_with_kind;
4344
use crate::module::{mod_dir_path, parse_external_mod, DirOwnership, ParsedExternalMod};
4445
use crate::placeholders::{placeholder, PlaceholderExpander};
@@ -882,7 +883,6 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
882883
}
883884

884885
impl<'ast, 'a> Visitor<'ast> for GateProcMacroInput<'a> {
885-
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
886886
fn visit_item(&mut self, item: &'ast ast::Item) {
887887
match &item.kind {
888888
ItemKind::Mod(_, mod_kind)
@@ -892,7 +892,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
892892
self.sess,
893893
sym::proc_macro_hygiene,
894894
item.span,
895-
"non-inline modules in proc macro input are unstable",
895+
fluent_generated::expand_non_inline_modules_in_proc_macro_input_are_unstable,
896896
)
897897
.emit();
898898
}

0 commit comments

Comments
 (0)