Skip to content

Rollup of 15 pull requests #142997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
595e88a
Windows: make read_dir stop iterating on error
ChrisDenton Jun 13, 2025
e627f88
Implement pinned borrows, part of `pin_ergonomics`
frank-king Jan 19, 2025
2090f40
Move `tests/ui/async-await/pin-ergonomics` to `tests/ui`
frank-king Mar 16, 2025
afdb54a
Move the place in `&pin mut $place` when `!Unpin` to ensure soundness
frank-king Apr 4, 2025
5d16a7b
Avoid a bitcast FFI call in transmuting
scottmcm Jun 20, 2025
ba5556d
Add `#[loop_match]` for improved DFA codegen
bjorn3 Feb 18, 2025
c3200c3
Tweak `-Zmacro-stats` measurement.
nnethercote Jun 23, 2025
77232fb
Fix normalization in linker-warning
bjorn3 Jun 24, 2025
fcb718b
Fix function signature for rust_eh_personality
bjorn3 Jun 24, 2025
659da58
Fix a bunch of missing unwinder related definitions
bjorn3 Jun 24, 2025
943d379
Error on invalid signatures for interrupt ABIs
folkertdev Jun 16, 2025
46e9d2f
Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect
shepmaster Jun 24, 2025
84f92f3
rustdoc: Don't mark `#[target_feature]` functions as ⚠
aDotInTheVoid Jun 24, 2025
1080b57
Corrected spelling mistake in c_str.rs
MetaNova Jun 24, 2025
5d44fdd
Rewrite #[track_caller]
jdonszelmann Jun 21, 2025
40a33af
fix clippy
jdonszelmann Jun 21, 2025
f9cdf3f
fix 142783
jdonszelmann Jun 21, 2025
4c7f054
Enable short-ice for Windows
dpaoliello Jun 21, 2025
e245570
Add rust-invalid ABI
compiler-errors Jun 24, 2025
e776065
Taint body on invalid call ABI
compiler-errors Jun 24, 2025
4a112db
Update wasm-component-ld to 0.5.14
alexcrichton Jun 24, 2025
041fbe8
Update cargo
ehuss Jun 25, 2025
4f47742
Rollup merge of #135731 - frank-king:feature/pin-borrow, r=eholk,trav…
workingjubilee Jun 25, 2025
f542909
Rollup merge of #138780 - trifectatechfoundation:loop_match_attr, r=o…
workingjubilee Jun 25, 2025
d46903b
Rollup merge of #142453 - ChrisDenton:fused, r=Amanieu
workingjubilee Jun 25, 2025
891dc0f
Rollup merge of #142633 - folkertdev:interrupt-abi-restrict-signature…
workingjubilee Jun 25, 2025
adaf340
Rollup merge of #142768 - scottmcm:avoid-unneeded-bitcast, r=WaffleLa…
workingjubilee Jun 25, 2025
2ad6272
Rollup merge of #142825 - jdonszelmann:track-caller, r=oli-obk
workingjubilee Jun 25, 2025
4af75b2
Rollup merge of #142844 - dpaoliello:short-ice, r=jieyouxu
workingjubilee Jun 25, 2025
b563109
Rollup merge of #142934 - nnethercote:tweak-macro-stats, r=petrochenkov
workingjubilee Jun 25, 2025
c062c49
Rollup merge of #142955 - bjorn3:cg_clif_test_fixes, r=jieyouxu
workingjubilee Jun 25, 2025
c381635
Rollup merge of #142977 - aDotInTheVoid:rustdochtml-targetfeature, r=…
workingjubilee Jun 25, 2025
ced6109
Rollup merge of #142980 - shepmaster:mismatched-syntaxes-multi-sugges…
workingjubilee Jun 25, 2025
d392e88
Rollup merge of #142982 - MetaNova:patch-1, r=jhpratt
workingjubilee Jun 25, 2025
0f77e83
Rollup merge of #142983 - compiler-errors:taint-invalid-call-abi, r=w…
workingjubilee Jun 25, 2025
1d49554
Rollup merge of #142988 - alexcrichton:update-wasm-component-ld, r=Ma…
workingjubilee Jun 25, 2025
2d73e6c
Rollup merge of #142993 - ehuss:update-cargo, r=ehuss
workingjubilee Jun 25, 2025
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
54 changes: 24 additions & 30 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,7 @@ dependencies = [
"rustc_abi",
"rustc_ast",
"rustc_ast_pretty",
"rustc_attr_data_structures",
"rustc_attr_parsing",
"rustc_data_structures",
"rustc_errors",
Expand Down Expand Up @@ -3316,6 +3317,7 @@ dependencies = [
"rustc_parse",
"rustc_session",
"rustc_span",
"rustc_target",
"thin-vec",
]

Expand Down Expand Up @@ -4116,6 +4118,7 @@ dependencies = [
"rustc_apfloat",
"rustc_arena",
"rustc_ast",
"rustc_attr_data_structures",
"rustc_data_structures",
"rustc_errors",
"rustc_fluent_macro",
Expand Down Expand Up @@ -5796,9 +5799,9 @@ dependencies = [

[[package]]
name = "wasi-preview1-component-adapter-provider"
version = "31.0.0"
version = "34.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86fabda09a0d89ffd1615b297b4a5d4b4d99df9598aeb24685837e63019e927b"
checksum = "aafa1e6af9a954a4bcf6ef420c33355d0ce84ddc6afbcba7bb6f05126f9120ae"

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

[[package]]
name = "wasm-component-ld"
version = "0.5.13"
version = "0.5.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a60a07a994a3538b57d8c5f8caba19f4793fb4c7156276e5e90e90acbb829e20"
checksum = "b015ec93764aa5517bc8b839efa9941b90be8ce680b1134f8224644ba1e48e3f"
dependencies = [
"anyhow",
"clap",
"lexopt",
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.229.0",
"wasmparser 0.234.0",
"wat",
"windows-sys 0.59.0",
"winsplit",
Expand All @@ -5897,12 +5900,12 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.229.0"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38ba1d491ecacb085a2552025c10a675a6fddcbd03b1fc9b36c536010ce265d2"
checksum = "170a0157eef517a179f2d20ed7c68df9c3f7f6c1c047782d488bf5a464174684"
dependencies = [
"leb128fmt",
"wasmparser 0.229.0",
"wasmparser 0.234.0",
]

[[package]]
Expand All @@ -5917,14 +5920,14 @@ dependencies = [

[[package]]
name = "wasm-metadata"
version = "0.229.0"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78fdb7d29a79191ab363dc90c1ddd3a1e880ffd5348d92d48482393a9e6c5f4d"
checksum = "a42fe3f5cbfb56fc65311ef827930d06189160038e81db62188f66b4bf468e3a"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.229.0",
"wasmparser 0.229.0",
"wasm-encoder 0.234.0",
"wasmparser 0.234.0",
]

[[package]]
Expand All @@ -5939,9 +5942,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.229.0"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0cc3b1f053f5d41aa55640a1fa9b6d1b8a9e4418d118ce308d20e24ff3575a8c"
checksum = "be22e5a8f600afce671dd53c8d2dd26b4b7aa810fd18ae27dfc49737f3e02fc5"
dependencies = [
"bitflags",
"hashbrown",
Expand All @@ -5950,15 +5953,6 @@ dependencies = [
"serde",
]

[[package]]
name = "wasmparser"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be22e5a8f600afce671dd53c8d2dd26b4b7aa810fd18ae27dfc49737f3e02fc5"
dependencies = [
"bitflags",
]

[[package]]
name = "wasmparser"
version = "0.235.0"
Expand Down Expand Up @@ -6411,9 +6405,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.229.0"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f550067740e223bfe6c4878998e81cdbe2529dd9a793dc49248dd6613394e8b"
checksum = "5a8888169acf4c6c4db535beb405b570eedac13215d6821ca9bd03190f7f8b8c"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6422,17 +6416,17 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.229.0",
"wasm-encoder 0.234.0",
"wasm-metadata",
"wasmparser 0.229.0",
"wasmparser 0.234.0",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.229.0"
version = "0.234.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "459c6ba62bf511d6b5f2a845a2a736822e38059c1cfa0b644b467bbbfae4efa6"
checksum = "465492df47d8dcc015a3b7f241aed8ea03688fee7c5e04162285c5b1a3539c8b"
dependencies = [
"anyhow",
"id-arena",
Expand All @@ -6443,7 +6437,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-xid",
"wasmparser 0.229.0",
"wasmparser 0.234.0",
]

[[package]]
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ pub enum ExternAbi {
/// Stronger than just `#[cold]` because `fn` pointers might be incompatible.
RustCold,

/// An always-invalid ABI that's used to test "this ABI is not supported by this platform"
/// in a platform-agnostic way.
RustInvalid,

/// Unstable impl detail that directly uses Rust types to describe the ABI to LLVM.
/// Even normally-compatible Rust types can become ABI-incompatible with this ABI!
Unadjusted,
Expand Down Expand Up @@ -157,6 +161,7 @@ abi_impls! {
RiscvInterruptS =><= "riscv-interrupt-s",
RustCall =><= "rust-call",
RustCold =><= "rust-cold",
RustInvalid =><= "rust-invalid",
Stdcall { unwind: false } =><= "stdcall",
Stdcall { unwind: true } =><= "stdcall-unwind",
System { unwind: false } =><= "system",
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,10 @@ pub enum BorrowKind {
/// The resulting type is either `*const T` or `*mut T`
/// where `T = typeof($expr)`.
Raw,
/// A pinned borrow, `&pin const $expr` or `&pin mut $expr`.
/// The resulting type is either `Pin<&'a T>` or `Pin<&'a mut T>`
/// where `T = typeof($expr)` and `'a` is some lifetime.
Pin,
}

#[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, HashStable_Generic)]
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_lowering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ doctest = false
rustc_abi = { path = "../rustc_abi" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
rustc_attr_data_structures = { path = "../rustc_attr_data_structures" }
rustc_attr_parsing = { path = "../rustc_attr_parsing" }
rustc_data_structures = { path = "../rustc_data_structures" }
rustc_errors = { path = "../rustc_errors" }
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_ast_lowering/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::sync::Arc;
use rustc_ast::ptr::P as AstP;
use rustc_ast::*;
use rustc_ast_pretty::pprust::expr_to_string;
use rustc_attr_data_structures::{AttributeKind, find_attr};
use rustc_data_structures::stack::ensure_sufficient_stack;
use rustc_hir as hir;
use rustc_hir::HirId;
Expand Down Expand Up @@ -831,7 +832,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
) {
if self.tcx.features().async_fn_track_caller()
&& let Some(attrs) = self.attrs.get(&outer_hir_id.local_id)
&& attrs.into_iter().any(|attr| attr.has_name(sym::track_caller))
&& find_attr!(*attrs, AttributeKind::TrackCaller(_))
{
let unstable_span = self.mark_span_with_reason(
DesugaringKind::Async,
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_ast_lowering/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ pub fn extern_abi_stability(abi: ExternAbi) -> Result<(), UnstableAbi> {
ExternAbi::RustCold => {
Err(UnstableAbi { abi, feature: sym::rust_cold_cc, explain: GateReason::Experimental })
}
ExternAbi::RustInvalid => {
Err(UnstableAbi { abi, feature: sym::rustc_attrs, explain: GateReason::ImplDetail })
}
ExternAbi::GpuKernel => Err(UnstableAbi {
abi,
feature: sym::abi_gpu_kernel,
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_passes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ rustc_macros = { path = "../rustc_macros" }
rustc_parse = { path = "../rustc_parse" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
thin-vec = "0.2.12"
# tidy-alphabetical-end
23 changes: 14 additions & 9 deletions compiler/rustc_ast_passes/messages.ftl
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
ast_passes_abi_custom_coroutine =
functions with the `"custom"` ABI cannot be `{$coroutine_kind_str}`
ast_passes_abi_cannot_be_coroutine =
functions with the {$abi} ABI cannot be `{$coroutine_kind_str}`
.suggestion = remove the `{$coroutine_kind_str}` keyword from this definiton

ast_passes_abi_custom_invalid_signature =
invalid signature for `extern "custom"` function
.note = functions with the `"custom"` ABI cannot have any parameters or return type
.suggestion = remove the parameters and return type

ast_passes_abi_custom_safe_foreign_function =
foreign functions with the `"custom"` ABI cannot be safe
foreign functions with the "custom" ABI cannot be safe
.suggestion = remove the `safe` keyword from this definition

ast_passes_abi_custom_safe_function =
functions with the `"custom"` ABI must be unsafe
functions with the "custom" ABI must be unsafe
.suggestion = add the `unsafe` keyword to this definition

ast_passes_abi_must_not_have_parameters_or_return_type=
invalid signature for `extern {$abi}` function
.note = functions with the {$abi} ABI cannot have any parameters or return type
.suggestion = remove the parameters and return type

ast_passes_abi_must_not_have_return_type=
invalid signature for `extern {$abi}` function
.note = functions with the "custom" ABI cannot have a return type
.help = remove the return type

ast_passes_assoc_const_without_body =
associated constant in `impl` without body
.suggestion = provide a definition for the constant
Expand Down
Loading
Loading