Skip to content

Commit b4ae8d4

Browse files
committed
Auto merge of #158958 - JonathanBrouwer:rollup-jBryWjn, r=JonathanBrouwer
Rollup of 18 pull requests Successful merges: - #158871 (add relnotes for 1.97.0) - #150946 (intrinsics: Add a fallback for non-const libm float functions) - #158617 (allow mGCA const arguments to fall back to anon consts) - #158645 (Fix splat ICEs and ban it in closures) - #158655 (Fix coroutine MIR saved local remapping) - #158666 (Carry the `b_offset` inside `BackendRepr::ScalarPair`) - #158920 (Update wasm-component-ld to 0.5.26) - #158926 (wrapping_sh* methods: clarify underspecified reference) - #158927 (add core test run with `-Zforce-intrinsic-fallback`) - #151379 (Stabilize `VecDeque::retain_back` from `truncate_front`) - #158807 (Add regression test for CString::clone_into unwind safety) - #158862 (Fix the span for parameter suggestion ) - #158883 (tests: fix enum-match.rs to handle LLVM 23) - #158894 (Make the ordering of non-terminal binds in ambiguity error messages deterministic) - #158902 (add codegen test for range length bound propagation) - #158913 (Update `browser-ui-test` version to `0.24.1`) - #158935 (std: support real fd methods on Emscripten) - #158951 (Merge three `MaxUniverse`s into one)
2 parents 7ef36ed + e1e7a6d commit b4ae8d4

203 files changed

Lines changed: 3973 additions & 1262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6213,9 +6213,9 @@ dependencies = [
62136213

62146214
[[package]]
62156215
name = "wasi-preview1-component-adapter-provider"
6216-
version = "44.0.2"
6216+
version = "46.0.1"
62176217
source = "registry+https://github.com/rust-lang/crates.io-index"
6218-
checksum = "2211ca2d69a88055eefb06bad741dde3180c9d4020f7e42fea72caba83f9c10c"
6218+
checksum = "1b6c48003fe59c201c97a7786ff55feabe6b6f83b598aa9ff5bcc4f94d940bf3"
62196219

62206220
[[package]]
62216221
name = "wasip2"
@@ -6282,9 +6282,9 @@ dependencies = [
62826282

62836283
[[package]]
62846284
name = "wasm-component-ld"
6285-
version = "0.5.25"
6285+
version = "0.5.26"
62866286
source = "registry+https://github.com/rust-lang/crates.io-index"
6287-
checksum = "ee72c06c556db23aca2d29e1e183d96efdffa7110b24915629a5091de600a894"
6287+
checksum = "51a12709376d4ce64f472699500db3b0e5902cc2bef16fb6ca3098bfdac032fa"
62886288
dependencies = [
62896289
"anyhow",
62906290
"clap",
@@ -6293,12 +6293,12 @@ dependencies = [
62936293
"libc",
62946294
"tempfile",
62956295
"wasi-preview1-component-adapter-provider",
6296-
"wasmparser 0.252.0",
6296+
"wasmparser 0.253.0",
62976297
"wat",
62986298
"windows-sys 0.61.2",
62996299
"winsplit",
6300-
"wit-component 0.252.0",
6301-
"wit-parser 0.252.0",
6300+
"wit-component 0.253.0",
6301+
"wit-parser 0.253.0",
63026302
]
63036303

63046304
[[package]]
@@ -6330,12 +6330,12 @@ dependencies = [
63306330

63316331
[[package]]
63326332
name = "wasm-encoder"
6333-
version = "0.252.0"
6333+
version = "0.253.0"
63346334
source = "registry+https://github.com/rust-lang/crates.io-index"
6335-
checksum = "8185ae345fa5687c054626ff9a50e7089797a343d9904d1dc9820eb4c4d3196f"
6335+
checksum = "59972d6cd272259de647b7c1f1912e45e289c75ffd4be04e10695507cd7e1b59"
63366336
dependencies = [
63376337
"leb128fmt",
6338-
"wasmparser 0.252.0",
6338+
"wasmparser 0.253.0",
63396339
]
63406340

63416341
[[package]]
@@ -6352,14 +6352,14 @@ dependencies = [
63526352

63536353
[[package]]
63546354
name = "wasm-metadata"
6355-
version = "0.252.0"
6355+
version = "0.253.0"
63566356
source = "registry+https://github.com/rust-lang/crates.io-index"
6357-
checksum = "2b7e08e02a3cd55bf778009d4cd6faae50da011f293644daf78a531a32d6d142"
6357+
checksum = "b3f45816ef616806f48498bcd831377de578c4fa51db0c83ab8ceb78cc13523b"
63586358
dependencies = [
63596359
"anyhow",
63606360
"indexmap",
6361-
"wasm-encoder 0.252.0",
6362-
"wasmparser 0.252.0",
6361+
"wasm-encoder 0.253.0",
6362+
"wasmparser 0.253.0",
63636363
]
63646364

63656365
[[package]]
@@ -6396,9 +6396,9 @@ dependencies = [
63966396

63976397
[[package]]
63986398
name = "wasmparser"
6399-
version = "0.252.0"
6399+
version = "0.253.0"
64006400
source = "registry+https://github.com/rust-lang/crates.io-index"
6401-
checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c"
6401+
checksum = "19db11f87d2486580e1e8b6f494c54df7e0566b87d0b599db843c24019667339"
64026402
dependencies = [
64036403
"bitflags",
64046404
"hashbrown 0.17.0",
@@ -6409,22 +6409,22 @@ dependencies = [
64096409

64106410
[[package]]
64116411
name = "wast"
6412-
version = "252.0.0"
6412+
version = "253.0.0"
64136413
source = "registry+https://github.com/rust-lang/crates.io-index"
6414-
checksum = "942a3449d6a593fccc111a6241c8df52bda168af30e40bf9580d4394d7374c65"
6414+
checksum = "d3264542f8965c5d84fb1085d924bfba9a6314bb228eff13a2de14d7627664d0"
64156415
dependencies = [
64166416
"bumpalo",
64176417
"leb128fmt",
64186418
"memchr",
64196419
"unicode-width 0.2.2",
6420-
"wasm-encoder 0.252.0",
6420+
"wasm-encoder 0.253.0",
64216421
]
64226422

64236423
[[package]]
64246424
name = "wat"
6425-
version = "1.252.0"
6425+
version = "1.253.0"
64266426
source = "registry+https://github.com/rust-lang/crates.io-index"
6427-
checksum = "c72a4ba7088f7bac94cf516e49882bdf97068904a563768cf249efc839ec42cb"
6427+
checksum = "4bfc5ce906144200c972ec617470aa35bd847472e170b26dde3e80541c674055"
64286428
dependencies = [
64296429
"wast",
64306430
]
@@ -6872,9 +6872,9 @@ dependencies = [
68726872

68736873
[[package]]
68746874
name = "wit-component"
6875-
version = "0.252.0"
6875+
version = "0.253.0"
68766876
source = "registry+https://github.com/rust-lang/crates.io-index"
6877-
checksum = "76db0662b590f45d33d0e363fa13539a5a1eecd35d5a12fe208c335461c1053d"
6877+
checksum = "dbbd2500ac3488489ee8c6e59b79d7e47e6da5bfb019efd35d5dca57b78af624"
68786878
dependencies = [
68796879
"anyhow",
68806880
"bitflags",
@@ -6883,10 +6883,10 @@ dependencies = [
68836883
"serde",
68846884
"serde_derive",
68856885
"serde_json",
6886-
"wasm-encoder 0.252.0",
6887-
"wasm-metadata 0.252.0",
6888-
"wasmparser 0.252.0",
6889-
"wit-parser 0.252.0",
6886+
"wasm-encoder 0.253.0",
6887+
"wasm-metadata 0.253.0",
6888+
"wasmparser 0.253.0",
6889+
"wit-parser 0.253.0",
68906890
]
68916891

68926892
[[package]]
@@ -6909,9 +6909,9 @@ dependencies = [
69096909

69106910
[[package]]
69116911
name = "wit-parser"
6912-
version = "0.252.0"
6912+
version = "0.253.0"
69136913
source = "registry+https://github.com/rust-lang/crates.io-index"
6914-
checksum = "4266bea110371c620ccf3201c5023676046bc4556e5c7cfb5d500bda5ebc162d"
6914+
checksum = "4d997b8e5920fcbeec742b58e583325d6419a6aca617ae8075c406a61c65ba8a"
69156915
dependencies = [
69166916
"anyhow",
69176917
"hashbrown 0.17.0",
@@ -6923,7 +6923,7 @@ dependencies = [
69236923
"serde_derive",
69246924
"serde_json",
69256925
"unicode-ident",
6926-
"wasmparser 0.252.0",
6926+
"wasmparser 0.253.0",
69276927
]
69286928

69296929
[[package]]

RELEASES.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,93 @@
1+
Version 1.97.0 (2026-07-09)
2+
==========================
3+
4+
<a id="1.97.0-Language"></a>
5+
6+
Language
7+
--------
8+
- [Consider `Result<T, Uninhabited>` and `ControlFlow<Uninhabited, T>` to be equivalent to `T` for must use lint](https://github.com/rust-lang/rust/pull/148214)
9+
- [Add allow-by-default `dead_code_pub_in_binary` lint for unused pub items in binary crates](https://github.com/rust-lang/rust/pull/149509)
10+
- [Stabilize the `div32`, `lam-bh`, `lamcas`, `ld-seq-sa` and `scq` target features](https://github.com/rust-lang/rust/pull/154510)
11+
- [Stabilize `cfg(target_has_atomic_primitive_alignment)`](https://github.com/rust-lang/rust/pull/155006)
12+
- [Allow trailing `self` in imports in more cases](https://github.com/rust-lang/rust/pull/155137)
13+
14+
15+
<a id="1.97.0-Platform-Support"></a>
16+
17+
Platform Support
18+
----------------
19+
- [nvptx64-nvidia-cuda: drop support for old architectures and old ISAs](https://github.com/rust-lang/rust/pull/152443)
20+
21+
22+
Refer to Rust's [platform support page][platform-support-doc]
23+
for more information on Rust's tiered platform support.
24+
25+
[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html
26+
27+
28+
<a id="1.97.0-Stabilized-APIs"></a>
29+
30+
Stabilized APIs
31+
---------------
32+
33+
- [`Default for RepeatN`](https://doc.rust-lang.org/stable/std/iter/struct.RepeatN.html#impl-Default-for-RepeatN%3CA%3E)
34+
- [`Copy for ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/std/ffi/struct.FromBytesUntilNulError.html#impl-Copy-for-FromBytesUntilNulError)
35+
- [`Send for std::fs::File` on UEFI](https://github.com/rust-lang/rust/pull/154003)
36+
- [`<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_highest_one)
37+
- [`<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_lowest_one)
38+
- [`<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.highest_one)
39+
- [`<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.lowest_one)
40+
- [`<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.bit_width)
41+
- [`NonZero<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_highest_one)
42+
- [`NonZero<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_lowest_one)
43+
- [`NonZero<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.highest_one)
44+
- [`NonZero<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.lowest_one)
45+
- [`NonZero<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.bit_width)
46+
47+
48+
These previously stable APIs are now stable in const contexts:
49+
50+
- [`char::is_control`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_control)
51+
52+
53+
<a id="1.97.0-Cargo"></a>
54+
55+
Cargo
56+
-----
57+
- [Stabilize `build.warnings` config.](https://github.com/rust-lang/cargo/pull/16796) This controls how lint warnings from local packages are treated. Useful for enforcing a warning-free build in CI, replacing `-Dwarnings`. [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#buildwarnings)
58+
- [Stabilize `resolver.lockfile-path` config.](https://github.com/rust-lang/cargo/pull/16694) This allows specifying the path to the lockfile to use when resolving dependencies. Useful when working with read-only source directories. [docs](https://doc.rust-lang.org/nightly/cargo/reference/config.html#resolverlockfile-path)
59+
- [cargo-clean: Error when `--target-dir` doesn't look like a Cargo target directory.](https://github.com/rust-lang/cargo/pull/16712) This prevents accidental deletion of non-target directories.
60+
- [Add `-m` shorthand for `--manifest-path`](https://github.com/rust-lang/cargo/pull/16858)
61+
- [Remove `curl` dependency from `crates-io` crate](https://github.com/rust-lang/cargo/pull/16936)
62+
63+
<a id="1.97.0-Rustdoc"></a>
64+
65+
Rustdoc
66+
-----
67+
- [Stabilize `--emit` flag](https://github.com/rust-lang/rust/pull/146220)
68+
- [Stabilize `--remap-path-prefix`](https://github.com/rust-lang/rust/pull/155307)
69+
70+
71+
<a id="1.97.0-Compatibility-Notes"></a>
72+
73+
Compatibility Notes
74+
-------------------
75+
- [Emit a future-compatibility warning when relying on `f32: From<{float}>` to constrain `{float}`](https://github.com/rust-lang/rust/pull/139087)
76+
- [Rust will use the v0 symbol mangling scheme by default.](https://github.com/rust-lang/rust/pull/151994) This may cause some tools (such as debuggers or profilers, especially with old versions) to fail to demangle symbols emitted by Rust. It may also cause the formatting of text in backtraces to change.
77+
- [Prevent deref coercions in `pin!`, in order to prevent unsoundness.](https://github.com/rust-lang/rust/pull/153457) The most likely case where this might impact users is: writing `pin!(x)` where `x` has type `&mut T` will now always correctly produce a value of type `Pin<&mut &mut T>`, instead of sometimes allowing a coercion that produces a value of type `Pin<&mut T>`. This coercion was previously incorrectly allowed since Rust 1.88.0.
78+
- [Deprecate `std::char` constants and functions](https://github.com/rust-lang/rust/pull/153873)
79+
- [Warn on linker output by default](https://github.com/rust-lang/rust/pull/153968)
80+
- [Remove hidden `f64` methods which have been deprecated since 1.0](https://github.com/rust-lang/rust/pull/153975)
81+
- [report the `varargs_without_pattern` lint in deps](https://github.com/rust-lang/rust/pull/154599)
82+
- [Forbid passing generic arguments to module path segments even if the module reexports a generic enum variant](https://github.com/rust-lang/rust/pull/154971)
83+
- [Error on invalid macho `link_section` specifier](https://github.com/rust-lang/rust/pull/155065)
84+
- The encoding of certain `enum`s [have changed](https://github.com/rust-lang/rust/pull/155473). This is not a breaking change, as it only applies to `enum`s without layout guarantees, but is noted here as we've seen people impacted from having made assumptions about the layout algorithm.
85+
- [Error on `#[export_name = "..."]` where the name is empty](https://github.com/rust-lang/rust/pull/155515)
86+
- [Syntactically reject tuple index shorthands in struct patterns](https://github.com/rust-lang/rust/pull/155698)
87+
- [validate `#[link_name = "..."]` & `#[link(name = "...")]` parameters](https://github.com/rust-lang/rust/pull/155817)
88+
- On Windows, after calling `shutdown` on a socket to shut down the write side, attempting to write to the socket will now produce a `BrokenPipe` error rather than `Other`. [Map `WSAESHUTDOWN` to `io::ErrorKind::BrokenPipe`](https://github.com/rust-lang/rust/pull/156063)
89+
90+
191
Version 1.96.1 (2026-06-30)
292
===========================
393

compiler/rustc_abi/src/callconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
8989
unreachable!("`homogeneous_aggregate` should not be called for scalable vectors")
9090
}
9191

92-
BackendRepr::ScalarPair(..) | BackendRepr::Memory { sized: true } => {
92+
BackendRepr::ScalarPair { .. } | BackendRepr::Memory { sized: true } => {
9393
// Helper for computing `homogeneous_aggregate`, allowing a custom
9494
// starting offset (used below for handling variants).
9595
let from_fields_at =

compiler/rustc_abi/src/layout.rs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
476476
Err(AbiMismatch) | Ok(None) => BackendRepr::Memory { sized: true },
477477
Ok(Some((repr, _))) => match repr {
478478
// Mismatched alignment (e.g. union is #[repr(packed)]): disable opt
479-
BackendRepr::Scalar(_) | BackendRepr::ScalarPair(_, _)
479+
BackendRepr::Scalar(_) | BackendRepr::ScalarPair { .. }
480480
if repr.scalar_platform_align(dl).unwrap() != align =>
481481
{
482482
BackendRepr::Memory { sized: true }
@@ -489,7 +489,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
489489
}
490490
// the alignment tests passed and we can use this
491491
BackendRepr::Scalar(..)
492-
| BackendRepr::ScalarPair(..)
492+
| BackendRepr::ScalarPair { .. }
493493
| BackendRepr::SimdVector { .. }
494494
| BackendRepr::SimdScalableVector { .. }
495495
| BackendRepr::Memory { .. } => repr,
@@ -558,7 +558,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
558558
};
559559
match &mut st.backend_repr {
560560
BackendRepr::Scalar(scalar) => hide_niches(scalar),
561-
BackendRepr::ScalarPair(a, b) => {
561+
BackendRepr::ScalarPair { a, b, b_offset: _ } => {
562562
hide_niches(a);
563563
hide_niches(b);
564564
}
@@ -701,13 +701,21 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
701701
// When the total alignment and size match, we can use the
702702
// same ABI as the scalar variant with the reserved niche.
703703
BackendRepr::Scalar(_) => BackendRepr::Scalar(niche_scalar),
704-
BackendRepr::ScalarPair(first, second) => {
704+
BackendRepr::ScalarPair { a: first, b: second, b_offset } => {
705705
// Only the niche is guaranteed to be initialised,
706706
// so use union layouts for the other primitive.
707707
if niche_offset == Size::ZERO {
708-
BackendRepr::ScalarPair(niche_scalar, second.to_union())
708+
BackendRepr::ScalarPair {
709+
a: niche_scalar,
710+
b: second.to_union(),
711+
b_offset,
712+
}
709713
} else {
710-
BackendRepr::ScalarPair(first.to_union(), niche_scalar)
714+
BackendRepr::ScalarPair {
715+
a: first.to_union(),
716+
b: niche_scalar,
717+
b_offset,
718+
}
711719
}
712720
}
713721
_ => BackendRepr::Memory { sized: true },
@@ -1037,7 +1045,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
10371045
// If we pick a "clever" (by-value) ABI, we might have to adjust the ABI of the
10381046
// variants to ensure they are consistent. This is because a downcast is
10391047
// semantically a NOP, and thus should not affect layout.
1040-
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair(..)) {
1048+
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair { .. }) {
10411049
for variant in &mut layout_variants {
10421050
// We only do this for variants with fields; the others are not accessed anyway.
10431051
// Also do not overwrite any already existing "clever" ABIs.
@@ -1354,7 +1362,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
13541362
}
13551363
// But scalar pairs are Rust-specific and get
13561364
// treated as aggregates by C ABIs anyway.
1357-
BackendRepr::ScalarPair(..) => {
1365+
BackendRepr::ScalarPair { .. } => {
13581366
abi = field.backend_repr;
13591367
}
13601368
_ => {}

compiler/rustc_abi/src/layout/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
110110
offsets: [Size::ZERO, b_offset].into(),
111111
in_memory_order: [FieldIdx::new(0), FieldIdx::new(1)].into(),
112112
},
113-
backend_repr: BackendRepr::ScalarPair(a, b),
113+
backend_repr: BackendRepr::ScalarPair { a, b, b_offset },
114114
largest_niche,
115115
uninhabited: false,
116116
align: AbiAlign::new(align),

0 commit comments

Comments
 (0)