Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2cc26bf
Remove rustc_legacy_const_generics from LoongArch64 SIMD
heiher Sep 9, 2026
9da2dbd
Stabilize LoongArch64 SIMD intrinsics
heiher Sep 9, 2026
9517075
Check associated const binding types
YUZHEthefool Aug 26, 2026
e06946d
run-make-support: Reexport the `windows` crate
tgross35 Oct 6, 2026
feefcc4
run-make-support: Add `run_fail_with_args` and `Debug` for `Completed…
tgross35 Oct 6, 2026
10269a5
std: Test the exit behavior of `abort` and `abort_immediate`
tgross35 Oct 6, 2026
a4aac2f
Use "latest" symlink for icx path
adamgemmell Oct 19, 2026
1077a78
Remove use of is_powerpc64_feature_detected
adamgemmell Oct 22, 2026
8bee029
Don't let riscv32gc-unknown-linux-gnu (tier 3) block CI on failure
adamgemmell Oct 22, 2026
2a66a81
Merge pull request #2259 from adamgemmell/dev/adagem01/icx-ver-bump
folkertdev Oct 22, 2026
3c5eefd
Merge pull request #2221 from heiher/stabilize-loong64-simd
folkertdev Oct 22, 2026
3aae136
Introduce `#[rustc_unchecked_type_alias]`
fmease Oct 22, 2026
921d8e6
uplift `post_analysis` TypingEnv constructor to type_ir
zedddie Sep 8, 2026
2773e1d
uplift interner methods
zedddie Sep 8, 2026
f0974e1
perf: avoid allocating HashSet in is_distinct check on small SwitchInts
panstromek Oct 26, 2026
3c72c94
normalize alias instead of calling `evaluate_const` in ConstEvaluatable
zedddie Sep 12, 2026
24fe712
bring interner's `anon_const_kind` back
zedddie Oct 14, 2026
8501073
refactor next-solver's CTFE entry-point
zedddie Sep 8, 2026
3228bae
bless
zedddie Oct 12, 2026
91f60f9
follow up review for global-alloc-reentry test
zanville Oct 26, 2026
a95082d
Prepare for merging from rust-lang/rust
invalid-email-address Oct 27, 2026
cf5da2b
Merge ref '16d1ffac17ad' from rust-lang/rust
invalid-email-address Oct 27, 2026
ed7d26d
Run `cargo fmt`
invalid-email-address Oct 27, 2026
6574cf3
Merge pull request #2246 from rust-lang/rustc-pull
tgross35 Oct 27, 2026
7f912f1
Bless mir-opt panic-abort tests
Jules-Bertholet Oct 27, 2026
7e1341e
Remove `TypeKind` from `rustc_codegen_ssa`
beetrees Oct 25, 2026
a1d449a
make powerpc `Complex` ABI GCC-compatible
folkertdev Jul 26, 2026
f02b6ab
powerpc: pad Complex arguments like GCC
folkertdev Oct 14, 2026
8590433
CI: rfl: move job to Ubuntu 26.04, LLVM 22 and bindgen 0.73.2
ojeda Oct 27, 2026
71a4e5a
CI: rfl: move job forward to Linux v7.3
ojeda Oct 25, 2026
5550f2b
remove unneeded `feature(stdarch_loongarch)`
folkertdev Oct 27, 2026
9973ea3
Make IoSlice and IoSliceMut methods unstably const
thaliaarchi Mar 30, 2025
efdba89
add regression tests for vector shift codegen issues
RalfJung Sep 5, 2026
0f73f2e
add regression test for _mm_mulhi_epu16 issue
RalfJung Sep 5, 2026
efb8152
add regression test for _mm256_avg_epu8 issue
RalfJung Oct 28, 2026
a7b3761
skip max_repr_align in Layout::eq_abi
RalfJung Oct 28, 2026
8443ca7
Avoid ICE on None from prepare_vtable_segments
lsunsi Oct 28, 2026
0dd45cb
Submodule update of rustc-perf
JonathanBrouwer Oct 28, 2026
d03a647
Fix `RUSTC_PGO_CRATES`
JonathanBrouwer Oct 28, 2026
0c2519a
Add variadics test to `fn-ptr-pattern.rs`
JonathanBrouwer Oct 28, 2026
cbdd279
move rustc_allow_const_fn_unstable attr check to attr parsing stage
RichardTjokroutomo Oct 28, 2026
e4f3f28
use exhaustive matching for layout comparison
RalfJung Oct 28, 2026
4f910e0
Remove stability note from `rust_splat`
JonathanBrouwer Oct 28, 2026
d9d743e
add test showing the problem
lqd Oct 28, 2026
6dc606c
ensure the `z` asm template modifier is gated under `asm_experimental…
lqd Oct 28, 2026
fd05e39
introduce unstable template modifier diagnostic variant
lqd Oct 28, 2026
810afd0
update test expectations
RichardTjokroutomo Oct 28, 2026
01943e6
Bump to include `--exact` validation
JonathanBrouwer Oct 28, 2026
7c1a1a8
Fix flaky CI test `named_temp_file_new_creates_file`
JonathanBrouwer Oct 28, 2026
9d65fdc
Improve feature gate message
JonathanBrouwer Oct 28, 2026
701cc61
Syntactically allow C-variadics in parenthesized argument lists
JonathanBrouwer Oct 28, 2026
ae59488
Improve `PathFoundCVariadicParams` suggestion
JonathanBrouwer Oct 28, 2026
d1a9611
Introduce MVP edition migration lint `unmarked_unchecked_type_aliases`
fmease Oct 22, 2026
09d07c6
Temporarily drop macos-26 jobs
JonathanBrouwer Oct 29, 2026
5d27293
Rollup merge of #165032 - folkertdev:stdarch-sync-2026-10-27, r=folke…
JonathanBrouwer Oct 29, 2026
d5a7090
Rollup merge of #165123 - JonathanBrouwer:macos-26, r=jieyouxu
JonathanBrouwer Oct 29, 2026
d36b4f8
Rollup merge of #165072 - JonathanBrouwer:rustc-perf, r=Kobzol
JonathanBrouwer Oct 29, 2026
a5a6c64
Rollup merge of #144090 - thaliaarchi:io-slice-const, r=tgross35
JonathanBrouwer Oct 29, 2026
2c9bf98
Rollup merge of #162342 - RalfJung:more-stdarch-regression-tests, r=f…
JonathanBrouwer Oct 29, 2026
09235c0
Rollup merge of #163909 - tgross35:test-abort, r=ChrisDenton
JonathanBrouwer Oct 29, 2026
117bec9
Rollup merge of #164766 - fmease:cta-migration-mvp, r=petrochenkov
JonathanBrouwer Oct 29, 2026
bdfa8d4
Rollup merge of #164916 - ojeda:ci-rfl-v7.3, r=lqd,kobzol
JonathanBrouwer Oct 29, 2026
fcde28a
Rollup merge of #164924 - beetrees:no-ssa-type-kind, r=bjorn3
JonathanBrouwer Oct 29, 2026
e9a828c
Rollup merge of #164969 - panstromek:is-distinct-fast-path, r=tmiasko
JonathanBrouwer Oct 29, 2026
ee5a328
Rollup merge of #165083 - lqd:sve-gate, r=davidtwco
JonathanBrouwer Oct 29, 2026
065bee9
Rollup merge of #165087 - JonathanBrouwer:named_temp_file_new_creates…
JonathanBrouwer Oct 29, 2026
5cc8393
Rollup merge of #161131 - YUZHEthefool:issue-161100, r=khyperia,BoxyUwU
JonathanBrouwer Oct 29, 2026
f25bc4c
Rollup merge of #161418 - zedddie:evaluate_const-stuff, r=khyperia,Bo…
JonathanBrouwer Oct 29, 2026
e98a9c8
Rollup merge of #164315 - folkertdev:complex-powerpc32, r=beetrees
JonathanBrouwer Oct 29, 2026
71aca69
Rollup merge of #164476 - lsunsi:issue153368, r=oli-obk
JonathanBrouwer Oct 29, 2026
315719a
Rollup merge of #165003 - zanville:global-alloc-reentry-followup, r=R…
JonathanBrouwer Oct 29, 2026
5fe8b5f
Rollup merge of #165020 - Jules-Bertholet:mir-opt, r=Enselic
JonathanBrouwer Oct 29, 2026
ed65e0e
Rollup merge of #165066 - RalfJung:abi-ice, r=oli-obk
JonathanBrouwer Oct 29, 2026
c4cf438
Rollup merge of #165080 - JonathanBrouwer:variadics, r=fmease
JonathanBrouwer Oct 29, 2026
5021ff4
Rollup merge of #165081 - RichardTjokroutomo:check_const_fn, r=Jonath…
JonathanBrouwer Oct 29, 2026
839e828
Rollup merge of #165082 - JonathanBrouwer:remove_note, r=jieyouxu
JonathanBrouwer Oct 29, 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
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3520,6 +3520,7 @@ dependencies = [
"similar",
"tempfile",
"wasmparser 0.247.0",
"windows 0.62.2",
]

[[package]]
Expand Down
41 changes: 34 additions & 7 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,15 @@ impl Float {
PpcF128 => "ppcf128",
}
}

pub fn is_ieee(self) -> bool {
use Float::*;

match self {
F16 | F32 | F64 | F128 => true,
F16B | PpcF128 => false,
}
}
}

/// Numeric primitives.
Expand Down Expand Up @@ -2460,16 +2469,34 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
/// aggregates are passed via `PassMode::Indirect`, `PassMode::IndirectUnsized` or
/// `PassMode::Cast`; more strict checks would otherwise be required.
pub fn eq_abi(&self, other: &Self) -> bool {
let LayoutData {
size,
align,
backend_repr,
// We assume aggregates are passed via `Cast` or `Indirect*` so their details either
// do not matter or they are checked by `PassMode::eq_abi`.
fields: _,
variants: _,
// Inhabitedness and niches are not ABI-relevant.
largest_niche: _,
uninhabited: _,
// max_repr_align, unadjusted_abi_align, repr_c are not read directly by codegen
// backends. They are only used to compute `PassMode`. So we can ignore them here, any
// differences they may cause are picked up by the `PassMode` check.
max_repr_align: _,
unadjusted_abi_align: _,
repr_c: _,
// The seed does not affect the ABI.
randomization_seed: _,
} = self;
// The one thing that we are not capturing here is that for unsized types, the metadata must
// also have the same ABI, and moreover that the same metadata leads to the same size. The
// 2nd point is quite hard to check though.
self.size == other.size
&& self.is_sized() == other.is_sized()
&& self.backend_repr.eq_up_to_validity(&other.backend_repr)
&& self.backend_repr.is_bool() == other.backend_repr.is_bool()
&& self.align.abi == other.align.abi
&& self.max_repr_align == other.max_repr_align
&& self.unadjusted_abi_align == other.unadjusted_abi_align
*size == other.size
&& *align == other.align
&& backend_repr.eq_up_to_validity(&other.backend_repr)
// `is_bool` checks validity and is ABI-relevant, so we need to consider it.
&& backend_repr.is_bool() == other.backend_repr.is_bool()
}
}

Expand Down
53 changes: 37 additions & 16 deletions compiler/rustc_ast_lowering/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,24 +261,45 @@ impl<'hir> LoweringContext<'_, 'hir> {
if class == asm::InlineAsmRegClass::Err {
continue;
}
let valid_modifiers = class.valid_modifiers(asm_arch.unwrap());
let valid_modifiers =
class.valid_modifiers(asm_arch.unwrap(), allow_experimental_reg);
if !valid_modifiers.contains(&modifier) {
let sub = if valid_modifiers.is_empty() {
InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier {
class_name: class.name(),
}
// First check if the requested modifier is missing from the valid
// values because experimental registers are disabled.
let unstable_modifiers = class.valid_modifiers(asm_arch.unwrap(), true);
if !allow_experimental_reg && unstable_modifiers.contains(&modifier) {
self.tcx.sess.create_feature_err(
InvalidAsmTemplateModifierRegClass {
placeholder_span,
op_span: op_sp,
modifier: modifier.to_string(),
sub: InvalidAsmTemplateModifierRegClassSub::ModifierIsGated {
class_name: class.name(),
feature: sym::asm_experimental_reg,
stable_modifiers: valid_modifiers.to_vec().into(),
all_modifiers: unstable_modifiers.to_vec().into(),
},
},
sym::asm_experimental_reg,
).emit();
} else {
InvalidAsmTemplateModifierRegClassSub::SupportModifier {
class_name: class.name(),
modifiers: valid_modifiers.to_vec().into(),
}
};
self.dcx().emit_err(InvalidAsmTemplateModifierRegClass {
placeholder_span,
op_span: op_sp,
modifier: modifier.to_string(),
sub,
});
let sub = if valid_modifiers.is_empty() {
InvalidAsmTemplateModifierRegClassSub::DoesNotSupportModifier {
class_name: class.name(),
}
} else {
InvalidAsmTemplateModifierRegClassSub::SupportModifier {
class_name: class.name(),
modifiers: valid_modifiers.to_vec().into(),
}
};
self.dcx().emit_err(InvalidAsmTemplateModifierRegClass {
placeholder_span,
op_span: op_sp,
modifier: modifier.to_string(),
sub,
});
}
}
}
hir::InlineAsmOperand::Const { .. } => {
Expand Down
12 changes: 12 additions & 0 deletions compiler/rustc_ast_lowering/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,18 @@ pub(crate) enum InvalidAsmTemplateModifierRegClassSub {
SupportModifier { class_name: Symbol, modifiers: DiagSymbolList<char> },
#[note("the `{$class_name}` register class does not support template modifiers")]
DoesNotSupportModifier { class_name: Symbol },

/// Enabling a feature is needed to use the requested modifier.
#[note(
"the `{$class_name}` register class only supports the following template modifiers on stable: {$stable_modifiers}"
)]
#[note("enabling the `{$feature}` feature will allow using: {$all_modifiers}")]
ModifierIsGated {
class_name: Symbol,
feature: Symbol,
stable_modifiers: DiagSymbolList<char>,
all_modifiers: DiagSymbolList<char>,
},
}

#[derive(Diagnostic)]
Expand Down
13 changes: 13 additions & 0 deletions compiler/rustc_ast_passes/src/ast_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,19 @@ impl Visitor<'_> for AstValidator<'_> {
Self::check_decl_no_pat(&args.inputs, |span, _, _| {
self.dcx().emit_err(diagnostics::PatternParenthesizedArgList { span });
});

let mut args = args.inputs.iter().peekable();
while let Some(arg) = args.next() {
if matches!(arg.ty.kind, TyKind::CVarArgs) {
let sugg_span = arg
.span
.until(args.peek().map(|a| a.span).unwrap_or(arg.span.shrink_to_hi()));
self.dcx().emit_err(diagnostics::PathFoundCVariadicParams {
span: arg.ty.span,
sugg_span,
});
}
}
}
visit::walk_path_segment(self, seg);
}
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_ast_passes/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,15 @@ pub(crate) struct PatternParenthesizedArgList {
pub span: Span,
}

#[derive(Diagnostic)]
#[diag("C-variadic parameters aren't allowed in parenthesized argument lists")]
pub(crate) struct PathFoundCVariadicParams {
#[primary_span]
pub span: Span,
#[suggestion("remove the C-variadics", applicability = "machine-applicable", code = "")]
pub sugg_span: Span,
}

#[derive(Diagnostic)]
#[diag("only a single explicit lifetime bound is permitted", code = E0226)]
pub(crate) struct TraitObjectBound {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_passes/src/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
);
gate_all!(
named_fn_trait_parameters,
"named parameters in parenthesized generic argument lists are experimental"
"parameters in parenthesized generic argument lists with names, attributes, or c-variadics are experimental"
);

// `associated_const_equality` will be stabilized as part of `gca_min_const_items`.
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_attr_ir/src/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,10 @@ pub enum AttributeKind {
limit: Limit,
},

/// Represents `#[rustc_unchecked_type_alias]`
// FIXME(#134963): Temporarily prefixed with `rustc_` to prevent potential name resolution ambiguities.
UncheckedTypeAlias,

/// Represents `#[rustc_unroll]`
// FIXME(#159429): temporarily renamed from `#[unroll]` to mitigate nameres ambiguity
Unroll(UnrollAttr),
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_attr_ir/src/encode_cross_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ impl AttributeKind {
ThreadLocal => No,
TrackCaller(..) => Yes,
TypeLengthLimit { .. } => No,
UncheckedTypeAlias => Yes,
Unroll(..) => No,
UnstableFeatureBound(..) => No,
UnstableRemoved(..) => Yes,
Expand Down Expand Up @@ -424,6 +425,7 @@ impl AttributeKind {
ThreadLocal => false,
TrackCaller(..) => false,
TypeLengthLimit { .. } => false,
UncheckedTypeAlias => false,
Unroll(..) => false,
UnstableFeatureBound(..) => false,
UnstableRemoved(..) => false,
Expand Down
18 changes: 18 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/allow_unstable.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::iter;

use rustc_ast::Const;
use rustc_attr_ir::target::AstTarget;
use rustc_feature::AttributeStability;

use super::macro_attrs::check_macro_only;
Expand Down Expand Up @@ -78,6 +80,22 @@ impl CombineAttributeParser for RustcAllowConstFnUnstableParser {
) -> impl IntoIterator<Item = Self::Item> {
parse_unstable(cx, args, <Self as CombineAttributeParser>::PATH[0])
}

fn finalize_check(cx: &mut FinalizeCheckContext<'_, '_>, attr_span: Span) {
match cx.ast_target {
AstTarget::Fn(_) | AstTarget::Method(_) => {
let fn_sig =
cx.ast_target.get_fn_sig().expect("missing fn signature for AST target");
if matches!(fn_sig.header.constness, Const::No) {
cx.emit_err(diagnostics::RustcAllowConstFnUnstable {
attr_span,
span: cx.target_span,
});
}
}
_ => {}
}
}
}

fn parse_unstable(
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_attr_parsing/src/attributes/semantics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ impl NoArgsAttributeParser for AlwaysGcaParser {
const STABILITY: AttributeStability = unstable!(gca_min_const_items);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::AlwaysGca;
}

pub(crate) struct UncheckedTypeAliasParser;
impl NoArgsAttributeParser for UncheckedTypeAliasParser {
const PATH: &[Symbol] = &[sym::rustc_unchecked_type_alias];
const ALLOWED_TARGETS: AllowedTargets<'_> =
AllowedTargets::AllowList(&[Allow(Target::TyAlias)]);
const STABILITY: AttributeStability = unstable!(marked_unchecked_type_aliases);
const CREATE: fn(Span) -> AttributeKind = |_| AttributeKind::UncheckedTypeAlias;
}
3 changes: 1 addition & 2 deletions compiler/rustc_attr_parsing/src/attributes/splat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub(crate) struct SplatParser;
impl NoArgsAttributeParser for SplatParser {
const PATH: &[Symbol] = &[sym::rustc_splat];
const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[Allow(Target::Param)]);
const STABILITY: AttributeStability =
unstable!(splat, "the `rustc_splat` attribute is experimental");
const STABILITY: AttributeStability = unstable!(splat);
const CREATE: fn(Span) -> AttributeKind = AttributeKind::Splat;
}
1 change: 1 addition & 0 deletions compiler/rustc_attr_parsing/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ attribute_parsers!(
Single<WithoutArgs<SplatParser>>,
Single<WithoutArgs<ThreadLocalParser>>,
Single<WithoutArgs<TrackCallerParser>>,
Single<WithoutArgs<UncheckedTypeAliasParser>>,
// tidy-alphabetical-end
];
);
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_attr_parsing/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ pub(crate) struct UnsafeAttrOutsideUnsafeLint {
pub suggestion: Option<crate::diagnostics::UnsafeAttrOutsideUnsafeSuggestion>,
}

#[derive(Diagnostic)]
#[diag("attribute should be applied to `const fn`")]
pub(crate) struct RustcAllowConstFnUnstable {
#[primary_span]
pub attr_span: Span,
#[label("not a `const fn`")]
pub span: Span,
}

#[derive(Diagnostic)]
#[diag(
"{$num_suggestions ->
Expand Down
Loading
Loading