Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
da13353
fix: more descriptive error message for enum to integer
Jaidenmagnan Jan 14, 2026
53f0ce8
fix: add the HELP message
Jaidenmagnan Jan 14, 2026
9f43e6d
feat: fixing PR feedback
Jaidenmagnan Apr 26, 2026
a1c5893
Added std library support for WALI command-line arguments.
arjunr2 May 1, 2026
a6d6601
interpret: correctly deal with repr(transparent) enums
RalfJung May 3, 2026
f4e1b2f
Use `into_bytes` directly
arjunr2 May 4, 2026
9ef7541
Restrict cfg gating on unix to not interfere with emscripten target
arjunr2 May 4, 2026
596d985
Adjust getMCSubtargetInfo signature for LLVM 23+
DKLoehr May 4, 2026
ad582a5
[AIX] add -bdbg:namedsects:ss link arg
daltenty May 4, 2026
fbb5809
Wasm: remove implicit `__heap_base`/`__data_end` exports
daxpedda May 5, 2026
227a289
add known-bug test for coroutine 'static-yields-non-'static unsoundness
inq May 5, 2026
4d6351d
use `deref_patterns` in `rustc_ast_passes`
cyrgani May 5, 2026
e291b07
use `deref_patterns` in `rustc_ast`
cyrgani May 5, 2026
f7817c2
use `deref_patterns` in `rustc_ast_lowering`
cyrgani May 5, 2026
46fac37
use `deref_patterns` in `rustc_ast_pretty`
cyrgani May 5, 2026
0e72a29
Always use `ConstFn` context for `const` closures
lapla-cogito May 5, 2026
6a19534
fix: remap ci-llvm debug paths via `-fdebug-prefix-map`
paradoxicalguy May 5, 2026
4120902
Narrow definitions
DKLoehr May 5, 2026
7f69708
Fix formatting
DKLoehr May 5, 2026
3c45cc9
move codegen tests into its folder
danieljofficial May 5, 2026
769c3a9
add issue links and bless
danieljofficial May 5, 2026
6865172
Use `all_impls` instead of handrolling it
oli-obk May 4, 2026
cb2c5fc
generic_const_args: allow paths to non type consts
khyperia May 5, 2026
fc6b9c8
updating flag with `flag_if_supported`
paradoxicalguy May 5, 2026
5d832f1
Don't run ui-fulldeps tests twice in stage 1
ehuss May 5, 2026
61743bf
fix: adding more verbose error message
Jaidenmagnan May 5, 2026
8634d63
move test
lcnr May 5, 2026
0f5d89f
fix: CopyPriority addition
Jaidenmagnan May 5, 2026
2717d98
Rollup merge of #151122 - Jaidenmagnan:main, r=chenyukang
jhpratt May 6, 2026
b2cc990
Rollup merge of #155341 - khyperia:non-type-const, r=BoxyUwU
jhpratt May 6, 2026
0092af0
Rollup merge of #156062 - arjunr2:wali-support-clargs, r=nia-e
jhpratt May 6, 2026
42b7c36
Rollup merge of #156159 - daltenty:daltenty/namesects, r=workingjubilee
jhpratt May 6, 2026
b594ef3
Rollup merge of #156174 - daxpedda:wasm-clear-exports, r=alexcrichton
jhpratt May 6, 2026
a758779
Rollup merge of #156186 - paradoxicalguy:fix-llvm-debuginfo-remap2, r…
jhpratt May 6, 2026
d1cdc9b
Rollup merge of #156193 - cyrgani:unbox-1, r=mejrs
jhpratt May 6, 2026
2b99e74
Rollup merge of #156201 - ehuss:no-fulldeps-twice, r=marcoieni
jhpratt May 6, 2026
7eb0a28
Rollup merge of #155808 - lapla-cogito:issue_155803, r=oli-obk
jhpratt May 6, 2026
38bbf33
Rollup merge of #156105 - RalfJung:transparent-enums, r=lcnr
jhpratt May 6, 2026
74d6b21
Rollup merge of #156148 - oli-obk:all_impls, r=lqd
jhpratt May 6, 2026
64b446b
Rollup merge of #156156 - DKLoehr:subtarget_info, r=cuviper
jhpratt May 6, 2026
46b1955
Rollup merge of #156170 - inq:add-known-bug-test-144442, r=JohnTitor
jhpratt May 6, 2026
f8a77e2
Rollup merge of #156195 - danieljofficial:move-tests-codegen, r=JohnT…
jhpratt May 6, 2026
e826e3f
Rollup merge of #156205 - lcnr:move-generalization-test, r=lqd
jhpratt May 6, 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
44 changes: 22 additions & 22 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4087,18 +4087,18 @@ impl ItemKind {
pub fn ident(&self) -> Option<Ident> {
match *self {
ItemKind::ExternCrate(_, ident)
| ItemKind::Static(box StaticItem { ident, .. })
| ItemKind::Const(box ConstItem { ident, .. })
| ItemKind::Fn(box Fn { ident, .. })
| ItemKind::Static(StaticItem { ident, .. })
| ItemKind::Const(ConstItem { ident, .. })
| ItemKind::Fn(Fn { ident, .. })
| ItemKind::Mod(_, ident, _)
| ItemKind::TyAlias(box TyAlias { ident, .. })
| ItemKind::TyAlias(TyAlias { ident, .. })
| ItemKind::Enum(ident, ..)
| ItemKind::Struct(ident, ..)
| ItemKind::Union(ident, ..)
| ItemKind::Trait(box Trait { ident, .. })
| ItemKind::TraitAlias(box TraitAlias { ident, .. })
| ItemKind::Trait(Trait { ident, .. })
| ItemKind::TraitAlias(TraitAlias { ident, .. })
| ItemKind::MacroDef(ident, _)
| ItemKind::Delegation(box Delegation { ident, .. }) => Some(ident),
| ItemKind::Delegation(Delegation { ident, .. }) => Some(ident),

ItemKind::ConstBlock(_) => Some(ConstBlockItem::IDENT),

Expand Down Expand Up @@ -4149,14 +4149,14 @@ impl ItemKind {

pub fn generics(&self) -> Option<&Generics> {
match self {
Self::Fn(box Fn { generics, .. })
| Self::TyAlias(box TyAlias { generics, .. })
| Self::Const(box ConstItem { generics, .. })
Self::Fn(Fn { generics, .. })
| Self::TyAlias(TyAlias { generics, .. })
| Self::Const(ConstItem { generics, .. })
| Self::Enum(_, generics, _)
| Self::Struct(_, generics, _)
| Self::Union(_, generics, _)
| Self::Trait(box Trait { generics, .. })
| Self::TraitAlias(box TraitAlias { generics, .. })
| Self::Trait(Trait { generics, .. })
| Self::TraitAlias(TraitAlias { generics, .. })
| Self::Impl(Impl { generics, .. }) => Some(generics),

Self::ExternCrate(..)
Expand Down Expand Up @@ -4205,20 +4205,20 @@ pub enum AssocItemKind {
impl AssocItemKind {
pub fn ident(&self) -> Option<Ident> {
match *self {
AssocItemKind::Const(box ConstItem { ident, .. })
| AssocItemKind::Fn(box Fn { ident, .. })
| AssocItemKind::Type(box TyAlias { ident, .. })
| AssocItemKind::Delegation(box Delegation { ident, .. }) => Some(ident),
AssocItemKind::Const(ConstItem { ident, .. })
| AssocItemKind::Fn(Fn { ident, .. })
| AssocItemKind::Type(TyAlias { ident, .. })
| AssocItemKind::Delegation(Delegation { ident, .. }) => Some(ident),

AssocItemKind::MacCall(_) | AssocItemKind::DelegationMac(_) => None,
}
}

pub fn defaultness(&self) -> Defaultness {
match *self {
Self::Const(box ConstItem { defaultness, .. })
| Self::Fn(box Fn { defaultness, .. })
| Self::Type(box TyAlias { defaultness, .. }) => defaultness,
Self::Const(ConstItem { defaultness, .. })
| Self::Fn(Fn { defaultness, .. })
| Self::Type(TyAlias { defaultness, .. }) => defaultness,
Self::MacCall(..) | Self::Delegation(..) | Self::DelegationMac(..) => {
Defaultness::Implicit
}
Expand Down Expand Up @@ -4271,9 +4271,9 @@ pub enum ForeignItemKind {
impl ForeignItemKind {
pub fn ident(&self) -> Option<Ident> {
match *self {
ForeignItemKind::Static(box StaticItem { ident, .. })
| ForeignItemKind::Fn(box Fn { ident, .. })
| ForeignItemKind::TyAlias(box TyAlias { ident, .. }) => Some(ident),
ForeignItemKind::Static(StaticItem { ident, .. })
| ForeignItemKind::Fn(Fn { ident, .. })
| ForeignItemKind::TyAlias(TyAlias { ident, .. }) => Some(ident),

ForeignItemKind::MacCall(_) => None,
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// tidy-alphabetical-start
#![doc(test(attr(deny(warnings), allow(internal_features))))]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(deref_patterns)]
#![feature(iter_order_by)]
#![feature(macro_metavar_expr)]
#![recursion_limit = "256"]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/util/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub fn contains_exterior_struct_lit(value: &ast::Expr) -> bool {
contains_exterior_struct_lit(x)
}

ast::ExprKind::MethodCall(box ast::MethodCall { receiver, .. }) => {
ast::ExprKind::MethodCall(ast::MethodCall { receiver, .. }) => {
// X { y: 1 }.bar(...)
contains_exterior_struct_lit(receiver)
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_ast/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ macro_rules! common_visitor_and_walkers {
visit_visitable!($($mut)? vis, impl_),
ItemKind::Trait(trait_) =>
visit_visitable!($($mut)? vis, trait_),
ItemKind::TraitAlias(box TraitAlias { constness, ident, generics, bounds}) => {
ItemKind::TraitAlias(TraitAlias { constness, ident, generics, bounds}) => {
visit_visitable!($($mut)? vis, constness, ident, generics);
visit_visitable_with!($($mut)? vis, bounds, BoundKind::Bound)
}
Expand Down Expand Up @@ -949,7 +949,7 @@ macro_rules! common_visitor_and_walkers {
impl_walkable!(|&$($mut)? $($lt)? self: Impl, vis: &mut V| {
let Impl { generics, of_trait, self_ty, items, constness: _ } = self;
try_visit!(vis.visit_generics(generics));
if let Some(box of_trait) = of_trait {
if let Some(of_trait) = of_trait {
let TraitImplHeader { defaultness, safety, polarity, trait_ref } = of_trait;
visit_visitable!($($mut)? vis, defaultness, safety, polarity, trait_ref);
}
Expand Down Expand Up @@ -1004,7 +1004,7 @@ macro_rules! common_visitor_and_walkers {
visit_visitable!($($mut)? vis, block, opt_label, span),
ExprKind::Match(subexpression, arms, kind) =>
visit_visitable!($($mut)? vis, subexpression, arms, kind),
ExprKind::Closure(box Closure {
ExprKind::Closure(Closure {
binder,
capture_clause,
coroutine_kind,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
);

let callee_path = this.arena.alloc(this.mk_expr(hir::ExprKind::Path(path), span));
let args = if let Some(box block) = delegation.body.as_ref() {
let args = if let Some(block) = delegation.body.as_ref() {
this.arena.alloc_slice(&[this.lower_target_expr(block)])
} else {
&mut []
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 @@ -118,7 +118,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::ExprKind::Call(f, self.lower_exprs(args))
}
}
ExprKind::MethodCall(box MethodCall { seg, receiver, args, span }) => {
ExprKind::MethodCall(MethodCall { seg, receiver, args, span }) => {
let hir_seg = self.arena.alloc(self.lower_path_segment(
e.span,
seg,
Expand Down Expand Up @@ -212,7 +212,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
),
ExprKind::Await(expr, await_kw_span) => self.lower_expr_await(*await_kw_span, expr),
ExprKind::Use(expr, use_kw_span) => self.lower_expr_use(*use_kw_span, expr),
ExprKind::Closure(box Closure {
ExprKind::Closure(Closure {
binder,
capture_clause,
constness,
Expand Down
58 changes: 22 additions & 36 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
i: &ItemKind,
) -> Vec<hir::Attribute> {
match i {
ItemKind::Fn(box Fn { eii_impls, .. })
| ItemKind::Static(box StaticItem { eii_impls, .. })
ItemKind::Fn(Fn { eii_impls, .. }) | ItemKind::Static(StaticItem { eii_impls, .. })
if eii_impls.is_empty() =>
{
Vec::new()
}
ItemKind::Fn(box Fn { eii_impls, .. })
| ItemKind::Static(box StaticItem { eii_impls, .. }) => {
ItemKind::Fn(Fn { eii_impls, .. }) | ItemKind::Static(StaticItem { eii_impls, .. }) => {
vec![hir::Attribute::Parsed(AttributeKind::EiiImpls(
eii_impls.iter().map(|i| self.lower_eii_impl(i)).collect(),
))]
Expand Down Expand Up @@ -298,7 +296,7 @@ impl<'hir> LoweringContext<'_, 'hir> {

self.lower_use_tree(use_tree, &prefix, id, vis_span, attrs)
}
ItemKind::Static(box ast::StaticItem {
ItemKind::Static(ast::StaticItem {
ident,
ty,
safety: _,
Expand All @@ -314,7 +312,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.lower_define_opaque(hir_id, define_opaque);
hir::ItemKind::Static(*m, ident, ty, body_id)
}
ItemKind::Const(box ConstItem {
ItemKind::Const(ConstItem {
defaultness: _,
ident,
generics,
Expand Down Expand Up @@ -352,7 +350,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.record_body(&[], body)
}),
),
ItemKind::Fn(box Fn {
ItemKind::Fn(Fn {
sig: FnSig { decl, header, span: fn_sig_span },
ident,
generics,
Expand Down Expand Up @@ -419,7 +417,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
self.lower_body(|this| (&[], this.expr(span, hir::ExprKind::InlineAsm(asm))));
hir::ItemKind::GlobalAsm { asm, fake_body }
}
ItemKind::TyAlias(box TyAlias { ident, generics, after_where_clause, ty, .. }) => {
ItemKind::TyAlias(TyAlias { ident, generics, after_where_clause, ty, .. }) => {
// We lower
//
// type Foo = impl Trait
Expand Down Expand Up @@ -539,7 +537,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
constness,
})
}
ItemKind::Trait(box Trait {
ItemKind::Trait(Trait {
impl_restriction,
constness,
is_auto,
Expand Down Expand Up @@ -580,7 +578,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
items,
}
}
ItemKind::TraitAlias(box TraitAlias { constness, ident, generics, bounds }) => {
ItemKind::TraitAlias(TraitAlias { constness, ident, generics, bounds }) => {
let constness = self.lower_constness(*constness);
let ident = self.lower_ident(*ident);
let (generics, bounds) = self.lower_generics(
Expand Down Expand Up @@ -615,7 +613,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
});
hir::ItemKind::Macro(ident, macro_def, macro_kinds)
}
ItemKind::Delegation(box delegation) => {
ItemKind::Delegation(delegation) => {
let delegation_results = self.lower_delegation(delegation, id);
hir::ItemKind::Fn {
sig: delegation_results.sig,
Expand Down Expand Up @@ -794,7 +792,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let attrs =
self.lower_attrs(hir_id, &i.attrs, i.span, Target::from_foreign_item_kind(&i.kind));
let (ident, kind) = match &i.kind {
ForeignItemKind::Fn(box Fn { sig, ident, generics, define_opaque, .. }) => {
ForeignItemKind::Fn(Fn { sig, ident, generics, define_opaque, .. }) => {
let fdec = &sig.decl;
let itctx = ImplTraitContext::Universal;
let (generics, (decl, fn_args)) =
Expand Down Expand Up @@ -822,7 +820,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
),
)
}
ForeignItemKind::Static(box StaticItem {
ForeignItemKind::Static(StaticItem {
ident,
ty,
mutability,
Expand All @@ -839,9 +837,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
(ident, hir::ForeignItemKind::Static(ty, *mutability, safety))
}
ForeignItemKind::TyAlias(box TyAlias { ident, .. }) => {
(ident, hir::ForeignItemKind::Type)
}
ForeignItemKind::TyAlias(TyAlias { ident, .. }) => (ident, hir::ForeignItemKind::Type),
ForeignItemKind::MacCall(_) => panic!("macro shouldn't exist here"),
};

Expand Down Expand Up @@ -980,7 +976,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
let trait_item_def_id = hir_id.expect_owner();

let (ident, generics, kind, has_value) = match &i.kind {
AssocItemKind::Const(box ConstItem {
AssocItemKind::Const(ConstItem {
ident,
generics,
ty,
Expand Down Expand Up @@ -1020,9 +1016,7 @@ impl<'hir> LoweringContext<'_, 'hir> {

(*ident, generics, kind, rhs_kind.has_expr())
}
AssocItemKind::Fn(box Fn {
sig, ident, generics, body: None, define_opaque, ..
}) => {
AssocItemKind::Fn(Fn { sig, ident, generics, body: None, define_opaque, .. }) => {
// FIXME(contracts): Deny contract here since it won't apply to
// any impl method or callees.
let idents = self.lower_fn_params_to_idents(&sig.decl);
Expand All @@ -1047,7 +1041,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
false,
)
}
AssocItemKind::Fn(box Fn {
AssocItemKind::Fn(Fn {
sig,
ident,
generics,
Expand Down Expand Up @@ -1082,7 +1076,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
true,
)
}
AssocItemKind::Type(box TyAlias {
AssocItemKind::Type(TyAlias {
ident,
generics,
after_where_clause,
Expand Down Expand Up @@ -1115,7 +1109,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
);
(*ident, generics, kind, ty.is_some())
}
AssocItemKind::Delegation(box delegation) => {
AssocItemKind::Delegation(delegation) => {
let delegation_results = self.lower_delegation(delegation, i.id);
let item_kind = hir::TraitItemKind::Fn(
delegation_results.sig,
Expand Down Expand Up @@ -1216,7 +1210,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
);

let (ident, (generics, kind)) = match &i.kind {
AssocItemKind::Const(box ConstItem {
AssocItemKind::Const(ConstItem {
ident,
generics,
ty,
Expand All @@ -1240,14 +1234,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
},
),
),
AssocItemKind::Fn(box Fn {
sig,
ident,
generics,
body,
contract,
define_opaque,
..
AssocItemKind::Fn(Fn {
sig, ident, generics, body, contract, define_opaque, ..
}) => {
let body_id = self.lower_maybe_coroutine_body(
sig.span,
Expand All @@ -1271,9 +1259,7 @@ impl<'hir> LoweringContext<'_, 'hir> {

(*ident, (generics, hir::ImplItemKind::Fn(sig, body_id)))
}
AssocItemKind::Type(box TyAlias {
ident, generics, after_where_clause, ty, ..
}) => {
AssocItemKind::Type(TyAlias { ident, generics, after_where_clause, ty, .. }) => {
let mut generics = generics.clone();
add_ty_alias_where_clause(&mut generics, after_where_clause, false);
(
Expand Down Expand Up @@ -1307,7 +1293,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
),
)
}
AssocItemKind::Delegation(box delegation) => {
AssocItemKind::Delegation(delegation) => {
let delegation_results = self.lower_delegation(delegation, i.id);
(
delegation.ident,
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//! in the HIR, especially for multiple identifiers.
// tidy-alphabetical-start
#![feature(box_patterns)]
#![feature(deref_patterns)]
#![recursion_limit = "256"]
// tidy-alphabetical-end

Expand Down
Loading
Loading