Skip to content

Commit 3730732

Browse files
committed
rustc_expand: make diagnostic translatable
1 parent 033becf commit 3730732

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

compiler/rustc_expand/messages.ftl

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ expand_attribute_meta_item =
1010
expand_attribute_single_word =
1111
attribute must only be a single word
1212
13+
expand_attributes_on_expressions_experimental =
14+
attributes on expressions are experimental
15+
.help_outer_doc = `///` is for documentation comments. For a plain comment, use `//`.
16+
1317
expand_attributes_wrong_form =
1418
attribute must be of form: `attributes(foo, bar)`
1519

compiler/rustc_expand/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -383,11 +383,11 @@ impl<'a> StripUnconfigured<'a> {
383383
&self.sess,
384384
sym::stmt_expr_attributes,
385385
attr.span,
386-
"attributes on expressions are experimental",
386+
crate::fluent_generated::expand_attributes_on_expressions_experimental,
387387
);
388388

389389
if attr.is_doc_comment() {
390-
err.help("`///` is for documentation comments. For a plain comment, use `//`.");
390+
err.help(crate::fluent_generated::expand_help_outer_doc);
391391
}
392392

393393
err.emit();

0 commit comments

Comments
 (0)