Rollup merge of #152612 - JonathanBrouwer:rename_to_msg, r=jdonszelmann

Rename `inline_fluent!` to `msg!`

This was the most popular name for the macro as voted in [#t-compiler > Bikeshed the new `inline_fluent!` macro @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Bikeshed.20the.20new.20.60inline_fluent!.60.20macro/near/572751863)
This commit is contained in:
Jonathan Brouwer 2026-02-14 18:55:38 +01:00 committed by GitHub
commit 38cc50b6e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 647 additions and 840 deletions

View file

@ -15,7 +15,7 @@ use rustc_attr_parsing::{
AttributeParser, CFG_TEMPLATE, EvalConfigResult, ShouldEmit, eval_config_entry, parse_cfg,
};
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
use rustc_errors::inline_fluent;
use rustc_errors::msg;
use rustc_feature::{
ACCEPTED_LANG_FEATURES, EnabledLangFeature, EnabledLibFeature, Features, REMOVED_LANG_FEATURES,
UNSTABLE_LANG_FEATURES,
@ -433,14 +433,14 @@ impl<'a> StripUnconfigured<'a> {
&self.sess,
sym::stmt_expr_attributes,
attr.span,
inline_fluent!("attributes on expressions are experimental"),
msg!("attributes on expressions are experimental"),
);
if attr.is_doc_comment() {
err.help(if attr.style == AttrStyle::Outer {
inline_fluent!("`///` is used for outer documentation comments; for a plain comment, use `//`")
msg!("`///` is used for outer documentation comments; for a plain comment, use `//`")
} else {
inline_fluent!("`//!` is used for inner documentation comments; for a plain comment, use `//` by removing the `!` or inserting a space in between them: `// !`")
msg!("`//!` is used for inner documentation comments; for a plain comment, use `//` by removing the `!` or inserting a space in between them: `// !`")
});
}

View file

@ -19,7 +19,7 @@ use rustc_attr_parsing::{
};
use rustc_data_structures::flat_map_in_place::FlatMapInPlace;
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_errors::{PResult, inline_fluent};
use rustc_errors::{PResult, msg};
use rustc_feature::Features;
use rustc_hir::Target;
use rustc_hir::def::MacroKinds;
@ -1051,7 +1051,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
self.sess,
sym::proc_macro_hygiene,
item.span,
inline_fluent!("file modules in proc macro input are unstable"),
msg!("file modules in proc macro input are unstable"),
)
.emit();
}