Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
12474ce
Impls and impl items inherit lint levels of the corresponding traits …
mu001999 Jul 18, 2025
304101f
Move all `thir::Pat` creation into `rustc_mir_build::thir::pattern`
Zalathar Jan 4, 2026
a956b56
Improve comment clarity in candidate_may_shadow
hkBst Jan 5, 2026
ba13bb4
Update wasm-component-ld
alexcrichton Jan 5, 2026
1925afb
Enable merge queue in new bors
Kobzol Jan 5, 2026
accfc34
rustc_codegen_llvm: update alignment for double on AIX
durin42 Dec 11, 2025
85c8e41
add pretty printing
Kivooeo Jan 5, 2026
fa4a62b
use PIDFD_GET_INFO ioctl when available
the8472 Dec 26, 2025
b0a581d
rename the `lower_ty` and `lower_ty_direct` to `lower_ty_and_alloc` and
reddevilmidzy Jan 6, 2026
56cb5d5
rename the `lower_anon_const_to_const_arg` and
reddevilmidzy Jan 6, 2026
e603055
Fix ICE when transmute Assume field is invalid
Delta17920 Jan 5, 2026
8b1bf8a
Rollup merge of #144113 - mu001999-contrib:dead-code/allow-trait, r=j…
JonathanBrouwer Jan 6, 2026
dea8b8b
Rollup merge of #149880 - durin42:llvm-22-ppc-aix-layout, r=nikic
JonathanBrouwer Jan 6, 2026
0a7a92d
Rollup merge of #150122 - reddevilmidzy:refactor, r=lcnr
JonathanBrouwer Jan 6, 2026
3b0d35f
Rollup merge of #150412 - the8472:pidfd-spawn, r=tgross35
JonathanBrouwer Jan 6, 2026
ce42a61
Rollup merge of #150670 - Zalathar:let-ty, r=Nadrieril
JonathanBrouwer Jan 6, 2026
dd08360
Rollup merge of #150695 - Kivooeo:pretty-printing, r=BoxyUwU
JonathanBrouwer Jan 6, 2026
959736d
Rollup merge of #150698 - hkBst:patch-6, r=jdonszelmann
JonathanBrouwer Jan 6, 2026
0d9ea4f
Rollup merge of #150706 - alexcrichton:update-wasm-component-ld, r=Ma…
JonathanBrouwer Jan 6, 2026
58b1130
Rollup merge of #150707 - Delta17920:fix-transmute-valtree-ice, r=Box…
JonathanBrouwer Jan 6, 2026
9c9ecb1
Rollup merge of #150708 - Kobzol:merge-queue, r=marcoieni
JonathanBrouwer Jan 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
53 changes: 27 additions & 26 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6221,9 +6221,9 @@ dependencies = [

[[package]]
name = "wasi-preview1-component-adapter-provider"
version = "38.0.4"
version = "40.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ec3ef3783e18f2457796ed91b1e6c2adc46f2905f740d1527ab3053fe8e5682"
checksum = "bb5e2b9858989c3a257de4ca169977f4f79897b64e4f482f188f4fcf8ac557d1"

[[package]]
name = "wasm-bindgen"
Expand Down Expand Up @@ -6272,17 +6272,18 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.19"
version = "0.5.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bfc50dd0b883d841bc1dba5ff7020ca52fa7b2c3bb1266d8bf6a09dd032e115"
checksum = "846d20ed66ae37b7a237e36dfcd2fdc979eae82a46cdb0586f9bba80782fd789"
dependencies = [
"anyhow",
"clap",
"clap_lex",
"lexopt",
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.241.2",
"wasmparser 0.243.0",
"wat",
"windows-sys 0.61.2",
"winsplit",
Expand All @@ -6309,24 +6310,24 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.241.2"
version = "0.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01164c9dda68301e34fdae536c23ed6fe90ce6d97213ccc171eebbd3d02d6b8"
checksum = "c55db9c896d70bd9fa535ce83cd4e1f2ec3726b0edd2142079f594fc3be1cb35"
dependencies = [
"leb128fmt",
"wasmparser 0.241.2",
"wasmparser 0.243.0",
]

[[package]]
name = "wasm-metadata"
version = "0.241.2"
version = "0.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "876fe286f2fa416386deedebe8407e6f19e0b5aeaef3d03161e77a15fa80f167"
checksum = "eae05bf9579f45a62e8d0a4e3f52eaa8da518883ac5afa482ec8256c329ecd56"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.241.2",
"wasmparser 0.241.2",
"wasm-encoder 0.243.0",
"wasmparser 0.243.0",
]

[[package]]
Expand All @@ -6351,9 +6352,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.241.2"
version = "0.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46d90019b1afd4b808c263e428de644f3003691f243387d30d673211ee0cb8e8"
checksum = "f6d8db401b0528ec316dfbe579e6ab4152d61739cfe076706d2009127970159d"
dependencies = [
"bitflags",
"hashbrown 0.15.5",
Expand All @@ -6364,22 +6365,22 @@ dependencies = [

[[package]]
name = "wast"
version = "241.0.2"
version = "243.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63f66e07e2ddf531fef6344dbf94d112df7c2f23ed6ffb10962e711500b8d816"
checksum = "df21d01c2d91e46cb7a221d79e58a2d210ea02020d57c092e79255cc2999ca7f"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.2",
"wasm-encoder 0.241.2",
"wasm-encoder 0.243.0",
]

[[package]]
name = "wat"
version = "1.241.2"
version = "1.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45f923705c40830af909c5dec2352ec2821202e4a66008194585e1917458a26d"
checksum = "226a9a91cd80a50449312fef0c75c23478fcecfcc4092bdebe1dc8e760ef521b"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6775,9 +6776,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.241.2"
version = "0.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0c57df25e7ee612d946d3b7646c1ddb2310f8280aa2c17e543b66e0812241"
checksum = "36f9fc53513e461ce51dcf17a3e331752cb829f1d187069e54af5608fc998fe4"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6786,17 +6787,17 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.241.2",
"wasm-encoder 0.243.0",
"wasm-metadata",
"wasmparser 0.241.2",
"wasmparser 0.243.0",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.241.2"
version = "0.243.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ef1c6ad67f35c831abd4039c02894de97034100899614d1c44e2268ad01c91"
checksum = "df983a8608e513d8997f435bb74207bf0933d0e49ca97aa9d8a6157164b9b7fc"
dependencies = [
"anyhow",
"id-arena",
Expand All @@ -6807,7 +6808,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser 0.241.2",
"wasmparser 0.243.0",
]

[[package]]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_ast_lowering/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
// Let statements are allowed to have impl trait in bindings.
let super_ = l.super_.map(|span| self.lower_span(span));
let ty = l.ty.as_ref().map(|t| {
self.lower_ty(t, self.impl_trait_in_bindings_ctxt(ImplTraitPosition::Variable))
self.lower_ty_alloc(t, self.impl_trait_in_bindings_ctxt(ImplTraitPosition::Variable))
});
let init = l.kind.init().map(|init| self.lower_expr(init));
let hir_id = self.lower_node_id(l.id);
Expand Down
17 changes: 10 additions & 7 deletions compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
ExprKind::Cast(expr, ty) => {
let expr = self.lower_expr(expr);
let ty =
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Cast));
let ty = self
.lower_ty_alloc(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Cast));
hir::ExprKind::Cast(expr, ty)
}
ExprKind::Type(expr, ty) => {
let expr = self.lower_expr(expr);
let ty =
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Cast));
let ty = self
.lower_ty_alloc(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Cast));
hir::ExprKind::Type(expr, ty)
}
ExprKind::AddrOf(k, m, ohs) => {
Expand Down Expand Up @@ -335,7 +335,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
ExprKind::FormatArgs(fmt) => self.lower_format_args(e.span, fmt),
ExprKind::OffsetOf(container, fields) => hir::ExprKind::OffsetOf(
self.lower_ty(
self.lower_ty_alloc(
container,
ImplTraitContext::Disallowed(ImplTraitPosition::OffsetOf),
),
Expand Down Expand Up @@ -371,7 +371,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
*kind,
self.lower_expr(expr),
ty.as_ref().map(|ty| {
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Cast))
self.lower_ty_alloc(
ty,
ImplTraitContext::Disallowed(ImplTraitPosition::Cast),
)
}),
),

Expand Down Expand Up @@ -617,7 +620,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
});

if let Some(ty) = opt_ty {
let ty = self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Path));
let ty = self.lower_ty_alloc(ty, ImplTraitContext::Disallowed(ImplTraitPosition::Path));
let block_expr = self.arena.alloc(self.expr_block(whole_block));
hir::ExprKind::Type(block_expr, ty)
} else {
Expand Down
51 changes: 31 additions & 20 deletions compiler/rustc_ast_lowering/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
define_opaque,
}) => {
let ident = self.lower_ident(*ident);
let ty =
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy));
let ty = self
.lower_ty_alloc(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy));
let body_id = self.lower_const_body(span, e.as_deref());
self.lower_define_opaque(hir_id, define_opaque);
hir::ItemKind::Static(*m, ident, ty, body_id)
Expand All @@ -279,8 +279,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
id,
ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|this| {
let ty = this
.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy));
let ty = this.lower_ty_alloc(
ty,
ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy),
);
let rhs = this.lower_const_item_rhs(attrs, rhs.as_ref(), span);
(ty, rhs)
},
Expand Down Expand Up @@ -379,7 +381,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
);
this.arena.alloc(this.ty(span, hir::TyKind::Err(guar)))
}
Some(ty) => this.lower_ty(
Some(ty) => this.lower_ty_alloc(
ty,
ImplTraitContext::OpaqueTy {
origin: hir::OpaqueTyOrigin::TyAlias {
Expand Down Expand Up @@ -453,7 +455,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
.as_deref()
.map(|of_trait| this.lower_trait_impl_header(of_trait));

let lowered_ty = this.lower_ty(
let lowered_ty = this.lower_ty_alloc(
ty,
ImplTraitContext::Disallowed(ImplTraitPosition::ImplSelf),
);
Expand Down Expand Up @@ -758,8 +760,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
safety,
define_opaque,
}) => {
let ty =
self.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy));
let ty = self
.lower_ty_alloc(ty, ImplTraitContext::Disallowed(ImplTraitPosition::StaticTy));
let safety = self.lower_safety(*safety, hir::Safety::Unsafe);
if define_opaque.is_some() {
self.dcx().span_err(i.span, "foreign statics cannot define opaque types");
Expand Down Expand Up @@ -870,7 +872,8 @@ impl<'hir> LoweringContext<'_, 'hir> {
&mut self,
(index, f): (usize, &FieldDef),
) -> hir::FieldDef<'hir> {
let ty = self.lower_ty(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy));
let ty =
self.lower_ty_alloc(&f.ty, ImplTraitContext::Disallowed(ImplTraitPosition::FieldTy));
let hir_id = self.lower_node_id(f.id);
self.lower_attrs(hir_id, &f.attrs, f.span, Target::Field);
hir::FieldDef {
Expand Down Expand Up @@ -908,8 +911,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
i.id,
ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|this| {
let ty = this
.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy));
let ty = this.lower_ty_alloc(
ty,
ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy),
);
let rhs = rhs
.as_ref()
.map(|rhs| this.lower_const_item_rhs(attrs, Some(rhs), i.span));
Expand Down Expand Up @@ -1008,7 +1013,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|this| {
let ty = ty.as_ref().map(|x| {
this.lower_ty(
this.lower_ty_alloc(
x,
ImplTraitContext::Disallowed(ImplTraitPosition::AssocTy),
)
Expand Down Expand Up @@ -1120,8 +1125,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
i.id,
ImplTraitContext::Disallowed(ImplTraitPosition::Generic),
|this| {
let ty = this
.lower_ty(ty, ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy));
let ty = this.lower_ty_alloc(
ty,
ImplTraitContext::Disallowed(ImplTraitPosition::ConstTy),
);
this.lower_define_opaque(hir_id, &define_opaque);
let rhs = this.lower_const_item_rhs(attrs, rhs.as_ref(), i.span);
hir::ImplItemKind::Const(ty, rhs)
Expand Down Expand Up @@ -1180,7 +1187,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
hir::ImplItemKind::Type(ty)
}
Some(ty) => {
let ty = this.lower_ty(
let ty = this.lower_ty_alloc(
ty,
ImplTraitContext::OpaqueTy {
origin: hir::OpaqueTyOrigin::TyAlias {
Expand Down Expand Up @@ -1916,7 +1923,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
bound_generic_params,
hir::GenericParamSource::Binder,
),
bounded_ty: self.lower_ty(
bounded_ty: self.lower_ty_alloc(
bounded_ty,
ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
),
Expand Down Expand Up @@ -1945,10 +1952,14 @@ impl<'hir> LoweringContext<'_, 'hir> {
}
WherePredicateKind::EqPredicate(WhereEqPredicate { lhs_ty, rhs_ty }) => {
hir::WherePredicateKind::EqPredicate(hir::WhereEqPredicate {
lhs_ty: self
.lower_ty(lhs_ty, ImplTraitContext::Disallowed(ImplTraitPosition::Bound)),
rhs_ty: self
.lower_ty(rhs_ty, ImplTraitContext::Disallowed(ImplTraitPosition::Bound)),
lhs_ty: self.lower_ty_alloc(
lhs_ty,
ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
),
rhs_ty: self.lower_ty_alloc(
rhs_ty,
ImplTraitContext::Disallowed(ImplTraitPosition::Bound),
),
})
}
});
Expand Down
Loading
Loading