Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
81c0218
aarch64: use `read_unaligned` for `vld1_*`
folkertdev Jan 27, 2026
5e5772d
aarch64: Guard RCPC3 intrinsics with target_has_atomic = "64"
Snehal-Reddy Feb 3, 2026
dfef120
x86: use `intrinsics::simd` for masked truncated saturating stores
folkertdev Jan 31, 2026
ad704a2
Merge pull request #2013 from folkertdev/llvm-22-masked-truncated-sat…
folkertdev Feb 8, 2026
3e07247
Merge pull request #2004 from folkertdev/arm-ld1-read
sayantn Feb 10, 2026
74397dc
Merge pull request #2020 from Snehal-Reddy/main
sayantn Feb 11, 2026
13189f4
use `?` instead of `*` for return types
cyrgani Feb 12, 2026
2f24a5e
remove `DispatcherTrait`
cyrgani Feb 12, 2026
e098327
Don't ICE on layout error in vtable computation
meithecatte Feb 10, 2026
3105348
replace `MessagePipe` trait with its impl
cyrgani Feb 12, 2026
f601b29
inline `SameThread` and `CrossThread`
cyrgani Feb 13, 2026
ab13120
Port #[rustc_proc_macro_decls] to the new attribute parser.
Ozzy1423 Feb 13, 2026
8af02e2
mGCA: Validate const literal against expected type
reddevilmidzy Feb 2, 2026
b4ee995
modify error comment and bless test, delete tests/ui/const-generics/g…
reddevilmidzy Feb 10, 2026
01d48c6
Move LitToConstInput into ty::consts
reddevilmidzy Feb 12, 2026
018a5ef
Rename `inline_fluent!` to `msg!`
JonathanBrouwer Feb 14, 2026
6ed7615
Port #[rustc_test_marker] to the attribute parser
Ozzy1423 Feb 13, 2026
b0366ce
DepGraphQuery: correctly skip adding edges with not-yet-added nodes
petrochenkov Feb 13, 2026
6213acd
Rollup merge of #152618 - folkertdev:stdarch-sync-2026-02-14, r=folke…
JonathanBrouwer Feb 14, 2026
5ae6bb3
Rollup merge of #152001 - reddevilmidzy:mgca-i, r=BoxyUwU
JonathanBrouwer Feb 14, 2026
2c4656a
Rollup merge of #152120 - meithecatte:push-ltvwvkqrytno, r=petrochenkov
JonathanBrouwer Feb 14, 2026
8a03b5f
Rollup merge of #152531 - cyrgani:pm-yet-another-cleanup, r=petrochenkov
JonathanBrouwer Feb 14, 2026
cf0cb74
Rollup merge of #152577 - Ozzy1423:macro-attr, r=JonathanBrouwer
JonathanBrouwer Feb 14, 2026
923fb76
Rollup merge of #152570 - Ozzy1423:attr-parse, r=JonathanBrouwer
JonathanBrouwer Feb 14, 2026
3f3c6fd
Rollup merge of #152590 - petrochenkov:skipedge, r=mati865
JonathanBrouwer Feb 14, 2026
38cc50b
Rollup merge of #152612 - JonathanBrouwer:rename_to_msg, r=jdonszelmann
JonathanBrouwer Feb 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::fmt::Write;

use rustc_ast::*;
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
use rustc_errors::inline_fluent;
use rustc_errors::msg;
use rustc_hir as hir;
use rustc_hir::def::{DefKind, Res};
use rustc_session::parse::feature_err;
Expand Down Expand Up @@ -67,7 +67,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
&self.tcx.sess,
sym::asm_experimental_arch,
sp,
inline_fluent!("inline assembly is not stable yet on this architecture"),
msg!("inline assembly is not stable yet on this architecture"),
)
.emit();
}
Expand All @@ -84,7 +84,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
&self.tcx.sess,
sym::asm_unwind,
sp,
inline_fluent!("the `may_unwind` option is unstable"),
msg!("the `may_unwind` option is unstable"),
)
.emit();
}
Expand Down Expand Up @@ -499,9 +499,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
sess,
sym::asm_goto_with_outputs,
*op_sp,
inline_fluent!(
"using both label and output operands for inline assembly is unstable"
),
msg!("using both label and output operands for inline assembly is unstable"),
)
.emit();
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::sync::Arc;
use rustc_ast::*;
use rustc_ast_pretty::pprust::expr_to_string;
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_errors::inline_fluent;
use rustc_errors::msg;
use rustc_hir as hir;
use rustc_hir::attrs::AttributeKind;
use rustc_hir::def::{DefKind, Res};
Expand Down Expand Up @@ -1702,7 +1702,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
&self.tcx.sess,
sym::yield_expr,
span,
inline_fluent!("yield syntax is experimental"),
msg!("yield syntax is experimental"),
)
.emit();
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use rustc_ast::visit::{self, AssocCtxt, FnCtxt, FnKind, Visitor};
use rustc_ast::{self as ast, AttrVec, NodeId, PatKind, attr, token};
use rustc_errors::inline_fluent;
use rustc_errors::msg;
use rustc_feature::{AttributeGate, BUILTIN_ATTRIBUTE_MAP, BuiltinAttribute, Features};
use rustc_session::Session;
use rustc_session::parse::{feature_err, feature_warn};
Expand Down Expand Up @@ -125,7 +125,7 @@ impl<'a> PostExpansionVisitor<'a> {
&self,
non_lifetime_binders,
non_lt_param_spans,
inline_fluent!("only lifetime parameters can be used in this context")
msg!("only lifetime parameters can be used in this context")
);

// FIXME(non_lifetime_binders): Const bound params are pretty broken.
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_attr_parsing/src/attributes/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::convert::identity;
use rustc_ast::token::Delimiter;
use rustc_ast::tokenstream::DelimSpan;
use rustc_ast::{AttrItem, Attribute, CRATE_NODE_ID, LitKind, ast, token};
use rustc_errors::{Applicability, PResult, inline_fluent};
use rustc_errors::{Applicability, PResult, msg};
use rustc_feature::{
AttrSuggestionStyle, AttributeTemplate, Features, GatedCfg, find_gated_cfg, template,
};
Expand Down Expand Up @@ -141,7 +141,7 @@ fn parse_cfg_entry_target<S: Stage>(
cx.sess(),
sym::cfg_target_compact,
meta_span,
inline_fluent!("compact `cfg(target(..))` is experimental and subject to change"),
msg!("compact `cfg(target(..))` is experimental and subject to change"),
)
.emit();
}
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_attr_parsing/src/attributes/link_attrs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use rustc_errors::inline_fluent;
use rustc_errors::msg;
use rustc_feature::Features;
use rustc_hir::attrs::AttributeKind::{LinkName, LinkOrdinal, LinkSection};
use rustc_hir::attrs::*;
Expand Down Expand Up @@ -316,7 +316,7 @@ impl LinkParser {
sess,
sym::raw_dylib_elf,
nv.value_span,
inline_fluent!("link kind `raw-dylib` is unstable on ELF platforms"),
msg!("link kind `raw-dylib` is unstable on ELF platforms"),
)
.emit();
} else {
Expand All @@ -331,7 +331,7 @@ impl LinkParser {
sess,
sym::link_arg_attribute,
nv.value_span,
inline_fluent!("link kind `link-arg` is unstable"),
msg!("link kind `link-arg` is unstable"),
)
.emit();
}
Expand Down Expand Up @@ -396,8 +396,7 @@ impl LinkParser {
return true;
};
if !features.link_cfg() {
feature_err(sess, sym::link_cfg, item.span(), inline_fluent!("link cfg is unstable"))
.emit();
feature_err(sess, sym::link_cfg, item.span(), msg!("link cfg is unstable")).emit();
}
*cfg = parse_cfg_entry(cx, link_cfg).ok();
true
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/macro_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,12 @@ impl<S: Stage> SingleAttributeParser<S> for CollapseDebugInfoParser {
Some(AttributeKind::CollapseDebugInfo(info))
}
}

pub(crate) struct RustcProcMacroDeclsParser;

impl<S: Stage> NoArgsAttributeParser<S> for RustcProcMacroDeclsParser {
const PATH: &[Symbol] = &[sym::rustc_proc_macro_decls];
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[Allow(Target::Static)]);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::RustcProcMacroDecls;
}
33 changes: 33 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/test_attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,36 @@ impl<S: Stage> SingleAttributeParser<S> for TestRunnerParser {
Some(AttributeKind::TestRunner(meta.path().0.clone()))
}
}

pub(crate) struct RustcTestMarkerParser;

impl<S: Stage> SingleAttributeParser<S> for RustcTestMarkerParser {
const PATH: &[Symbol] = &[sym::rustc_test_marker];
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepOutermost;
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Warn;
const ALLOWED_TARGETS: AllowedTargets = AllowedTargets::AllowList(&[
Allow(Target::Const),
Allow(Target::Fn),
Allow(Target::Static),
]);
const TEMPLATE: AttributeTemplate = template!(NameValueStr: "test_path");

fn convert(cx: &mut AcceptContext<'_, '_, S>, args: &ArgParser) -> Option<AttributeKind> {
let Some(name_value) = args.name_value() else {
cx.expected_name_value(cx.attr_span, Some(sym::rustc_test_marker));
return None;
};

let Some(value_str) = name_value.value_as_str() else {
cx.expected_string_literal(name_value.value_span, None);
return None;
};

if value_str.as_str().trim().is_empty() {
cx.expected_non_empty_string_literal(name_value.value_span);
return None;
}

Some(AttributeKind::RustcTestMarker(value_str))
}
}
2 changes: 2 additions & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ attribute_parsers!(
Single<RustcScalableVectorParser>,
Single<RustcSimdMonomorphizeLaneLimitParser>,
Single<RustcSymbolName>,
Single<RustcTestMarkerParser>,
Single<SanitizeParser>,
Single<ShouldPanicParser>,
Single<SkipDuringMethodDispatchParser>,
Expand Down Expand Up @@ -300,6 +301,7 @@ attribute_parsers!(
Single<WithoutArgs<RustcOutlivesParser>>,
Single<WithoutArgs<RustcPassIndirectlyInNonRusticAbisParser>>,
Single<WithoutArgs<RustcPreserveUbChecksParser>>,
Single<WithoutArgs<RustcProcMacroDeclsParser>>,
Single<WithoutArgs<RustcReallocatorParser>>,
Single<WithoutArgs<RustcRegionsParser>>,
Single<WithoutArgs<RustcShouldNotBeCalledOnConstItems>>,
Expand Down
18 changes: 6 additions & 12 deletions compiler/rustc_borrowck/src/diagnostics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use std::collections::BTreeMap;

use rustc_abi::{FieldIdx, VariantIdx};
use rustc_data_structures::fx::FxIndexMap;
use rustc_errors::{
Applicability, Diag, DiagMessage, EmissionGuarantee, MultiSpan, inline_fluent, listify,
};
use rustc_errors::{Applicability, Diag, DiagMessage, EmissionGuarantee, MultiSpan, listify, msg};
use rustc_hir::def::{CtorKind, Namespace};
use rustc_hir::{
self as hir, CoroutineKind, GenericBound, LangItem, WhereBoundPredicate, WherePredicateKind,
Expand Down Expand Up @@ -1313,7 +1311,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
let mut span: MultiSpan = spans.clone().into();
err.arg("ty", param_ty.to_string());
let msg = err.dcx.eagerly_translate_to_string(
inline_fluent!("`{$ty}` is made to be an `FnOnce` closure here"),
msg!("`{$ty}` is made to be an `FnOnce` closure here"),
err.args.iter(),
);
err.remove_arg("ty");
Expand All @@ -1322,12 +1320,9 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
}
span.push_span_label(
fn_call_span,
inline_fluent!("this value implements `FnOnce`, which causes it to be moved when called"),
);
err.span_note(
span,
inline_fluent!("`FnOnce` closures can only be called once"),
msg!("this value implements `FnOnce`, which causes it to be moved when called"),
);
err.span_note(span, msg!("`FnOnce` closures can only be called once"));
} else {
err.subdiagnostic(CaptureReasonNote::FnOnceMoveInCall { var_span });
}
Expand Down Expand Up @@ -1573,6 +1568,5 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
}
}

const LIMITATION_NOTE: DiagMessage = inline_fluent!(
"due to a current limitation of the type system, this implies a `'static` lifetime"
);
const LIMITATION_NOTE: DiagMessage =
msg!("due to a current limitation of the type system, this implies a `'static` lifetime");
16 changes: 7 additions & 9 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Error reporting machinery for lifetime errors.
use rustc_data_structures::fx::FxIndexSet;
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, inline_fluent};
use rustc_errors::{Applicability, Diag, ErrorGuaranteed, MultiSpan, msg};
use rustc_hir as hir;
use rustc_hir::GenericBound::Trait;
use rustc_hir::QPath::Resolved;
Expand Down Expand Up @@ -291,7 +291,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
if suggestions.len() > 0 {
suggestions.dedup();
diag.multipart_suggestion_verbose(
inline_fluent!("consider restricting the type parameter to the `'static` lifetime"),
msg!("consider restricting the type parameter to the `'static` lifetime"),
suggestions,
Applicability::MaybeIncorrect,
);
Expand Down Expand Up @@ -982,18 +982,16 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
let mut multi_span: MultiSpan = vec![*span].into();
multi_span.push_span_label(
*span,
inline_fluent!("this has an implicit `'static` lifetime requirement"),
msg!("this has an implicit `'static` lifetime requirement"),
);
multi_span.push_span_label(
ident.span,
inline_fluent!(
"calling this method introduces the `impl`'s `'static` requirement"
),
msg!("calling this method introduces the `impl`'s `'static` requirement"),
);
err.subdiagnostic(RequireStaticErr::UsedImpl { multi_span });
err.span_suggestion_verbose(
span.shrink_to_hi(),
inline_fluent!("consider relaxing the implicit `'static` requirement"),
msg!("consider relaxing the implicit `'static` requirement"),
" + '_",
Applicability::MaybeIncorrect,
);
Expand Down Expand Up @@ -1156,7 +1154,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
if ocx.evaluate_obligations_error_on_ambiguity().is_empty() && count > 0 {
diag.span_suggestion_verbose(
tcx.hir_body(*body).value.peel_blocks().span.shrink_to_lo(),
inline_fluent!("dereference the return value"),
msg!("dereference the return value"),
"*".repeat(count),
Applicability::MachineApplicable,
);
Expand Down Expand Up @@ -1200,7 +1198,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
if let Some(closure_span) = closure_span {
diag.span_suggestion_verbose(
closure_span,
inline_fluent!("consider adding 'move' keyword before the nested closure"),
msg!("consider adding 'move' keyword before the nested closure"),
"move ",
Applicability::MaybeIncorrect,
);
Expand Down
11 changes: 5 additions & 6 deletions compiler/rustc_builtin_macros/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use rustc_errors::codes::*;
use rustc_errors::{
Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, MultiSpan, SingleLabelManySpans,
Subdiagnostic, inline_fluent,
Subdiagnostic, msg,
};
use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic};
use rustc_span::{Ident, Span, Symbol};
Expand Down Expand Up @@ -764,7 +764,7 @@ pub(crate) struct FormatUnusedArg {
impl Subdiagnostic for FormatUnusedArg {
fn add_to_diag<G: EmissionGuarantee>(self, diag: &mut Diag<'_, G>) {
diag.arg("named", self.named);
let msg = diag.eagerly_translate(inline_fluent!(
let msg = diag.eagerly_translate(msg!(
"{$named ->
[true] named argument
*[false] argument
Expand Down Expand Up @@ -947,13 +947,12 @@ pub(crate) struct AsmClobberNoReg {
impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for AsmClobberNoReg {
fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, G> {
// eager translation as `span_labels` takes `AsRef<str>`
let lbl1 = dcx.eagerly_translate_to_string(inline_fluent!("clobber_abi"), [].into_iter());
let lbl2 =
dcx.eagerly_translate_to_string(inline_fluent!("generic outputs"), [].into_iter());
let lbl1 = dcx.eagerly_translate_to_string(msg!("clobber_abi"), [].into_iter());
let lbl2 = dcx.eagerly_translate_to_string(msg!("generic outputs"), [].into_iter());
Diag::new(
dcx,
level,
inline_fluent!("asm with `clobber_abi` must specify explicit registers for outputs"),
msg!("asm with `clobber_abi` must specify explicit registers for outputs"),
)
.with_span(self.spans.clone())
.with_span_labels(self.clobbers, &lbl1)
Expand Down
26 changes: 13 additions & 13 deletions compiler/rustc_codegen_llvm/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::ffi::CString;
use std::path::Path;

use rustc_data_structures::small_c_str::SmallCStr;
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, inline_fluent};
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, msg};
use rustc_macros::Diagnostic;
use rustc_span::Span;

Expand All @@ -28,7 +28,7 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for ParseTargetMachineConfig<'_> {
Diag::new(
dcx,
level,
inline_fluent!("failed to parse target machine config to target machine: {$error}"),
msg!("failed to parse target machine config to target machine: {$error}"),
)
.with_arg("error", message)
}
Expand Down Expand Up @@ -121,25 +121,25 @@ impl<G: EmissionGuarantee> Diagnostic<'_, G> for WithLlvmError<'_> {
fn into_diag(self, dcx: DiagCtxtHandle<'_>, level: Level) -> Diag<'_, G> {
use LlvmError::*;
let msg_with_llvm_err = match &self.0 {
WriteOutput { .. } => inline_fluent!("could not write output to {$path}: {$llvm_err}"),
CreateTargetMachine { .. } => inline_fluent!(
"could not create LLVM TargetMachine for triple: {$triple}: {$llvm_err}"
),
RunLlvmPasses => inline_fluent!("failed to run LLVM passes: {$llvm_err}"),
WriteIr { .. } => inline_fluent!("failed to write LLVM IR to {$path}: {$llvm_err}"),
WriteOutput { .. } => msg!("could not write output to {$path}: {$llvm_err}"),
CreateTargetMachine { .. } => {
msg!("could not create LLVM TargetMachine for triple: {$triple}: {$llvm_err}")
}
RunLlvmPasses => msg!("failed to run LLVM passes: {$llvm_err}"),
WriteIr { .. } => msg!("failed to write LLVM IR to {$path}: {$llvm_err}"),
PrepareThinLtoContext => {
inline_fluent!("failed to prepare thin LTO context: {$llvm_err}")
msg!("failed to prepare thin LTO context: {$llvm_err}")
}
LoadBitcode { .. } => {
inline_fluent!("failed to load bitcode of module \"{$name}\": {$llvm_err}")
msg!("failed to load bitcode of module \"{$name}\": {$llvm_err}")
}
WriteThinLtoKey { .. } => {
inline_fluent!("error while writing ThinLTO key data: {$err}: {$llvm_err}")
msg!("error while writing ThinLTO key data: {$err}: {$llvm_err}")
}
PrepareThinLtoModule => {
inline_fluent!("failed to prepare thin LTO module: {$llvm_err}")
msg!("failed to prepare thin LTO module: {$llvm_err}")
}
ParseBitcode => inline_fluent!("failed to parse bitcode for LTO module: {$llvm_err}"),
ParseBitcode => msg!("failed to parse bitcode for LTO module: {$llvm_err}"),
};
self.0
.into_diag(dcx, level)
Expand Down
Loading
Loading