Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
1d49df6
Stabilize `VecDeque::retain_back` from `truncate_front`
cammeresi Jan 19, 2026
426657c
loongarch: Use `intrinsics::simd` for v{ld,st}[x]
heiher May 28, 2026
3e6a43d
allow `Allocator`s to be used as `#[global_allocator]`s
joboet May 29, 2026
46939fa
std: implement `GlobalAllocator` for `System`
joboet May 29, 2026
6c2e9d5
bless UI tests
joboet May 31, 2026
5042010
core: allow zero-size checks to be optimized out for `GlobalAllocator`
joboet Jun 21, 2026
ebe31bf
Better docs for PartialEq
hkBst Oct 10, 2025
285d935
intrinsic-test: default to `--no-fail-fast`
davidtwco Jun 22, 2026
1d594c4
intrinsic-test: specializations as iterator
davidtwco May 20, 2026
9ac81d1
intrinsic-test: impl `get_load_function` for SVE
davidtwco Jun 1, 2026
b3ef0a5
Replace cfg_if with cfg_select
hkBst Jun 25, 2026
0fcde25
intrinsic-test: use `arm_sve.h` and target feats
davidtwco Jun 1, 2026
680b275
intrinsic-test: `bool` test values
davidtwco Jun 1, 2026
f733bf8
intrinsic-test: values for enum-typed constraints
davidtwco Jun 1, 2026
e88c874
intrinsic-test: no test values for `svbool_t`
davidtwco Jun 1, 2026
daab032
intrinsic-test: introduce `predicate_function`
davidtwco Jun 1, 2026
13678b0
intrinsic-test: sve comparison and predicates
davidtwco Jun 1, 2026
1393d87
intrinsic-test: test values for `svbool_t`
davidtwco Jun 4, 2026
d9cab00
intrinsic-test: enable non-baseline target features
davidtwco Jun 11, 2026
c10f404
intrinsic-test: SVE float comparison
davidtwco Jun 11, 2026
687d636
intrinsic-test: stop skipping SVE intrinsics
davidtwco Jun 1, 2026
3d2e05b
intrinsic-test: print scalable vectors on test fail
davidtwco Jun 15, 2026
3316f81
core_arch: redefine `svtrn{1,2}`
davidtwco Jun 22, 2026
f326508
Merge pull request #2160 from davidtwco/intrinsic-test-sve
sayantn Jun 28, 2026
ce3cff8
Merge pull request #2174 from hkBst/cfg-select
folkertdev Jun 28, 2026
e3e20ed
Rename HAS_CT_PROJECTION to HAS_CONST_ALIASES
Shourya742 Jun 27, 2026
d5b0137
Merge pull request #2146 from heiher/vld-st-x
folkertdev Jun 29, 2026
d08cce8
Merge stdarch-gen-hexagon-scalar into stdarch-gen-hexagon
xonx4l Jun 27, 2026
93c9813
Merge pull request #2175 from xonx4l/merge-hexagon-generators
folkertdev Jun 29, 2026
a9832de
loongarch: Use `intrinsics::simd` for vrotr[i]
heiher Jun 2, 2026
8da5bdb
Merge pull request #2150 from heiher/vrotr-i
folkertdev Jun 30, 2026
24dcc9f
loongarch: Use `intrinsics::simd` for vfrecip
heiher Jun 2, 2026
2d10d1f
Merge pull request #2151 from heiher/vfrecip
folkertdev Jun 30, 2026
b6d1f13
loongarch: Use `intrinsics::simd` for vfrsqrt
heiher Jun 2, 2026
2482d47
Merge pull request #2152 from heiher/vfrsqrt
folkertdev Jun 30, 2026
6f6aac0
loongarch: Use `intrinsics::simd` for vfrintr{p,m,z}
heiher Jun 2, 2026
f959792
Merge pull request #2153 from heiher/vfrintr-p-m-z
folkertdev Jun 30, 2026
392facd
loongarch: Use `intrinsics::simd` for vmuh
heiher Jun 11, 2026
4f762a3
Merge pull request #2158 from heiher/vmuh
folkertdev Jul 1, 2026
d24fa95
Test the ordering of non-terminal binds in ambiguity error messages
Jul 2, 2026
87c76f9
Deterministically order `MatcherLoc`s in error messages
Jul 2, 2026
cc71d5c
simplify `Option::into_flat_iter` signature
WaffleLapkin Jul 3, 2026
a29353b
Vec::dedup_by docs explicit function argument order
m4dh0rs3 Jul 6, 2026
c7eb5e4
add test for wrong suggest of self receiver
chenyukang Jul 6, 2026
d09f7ca
correct the span for parameter suggestion
chenyukang Jul 6, 2026
eef7f2e
Add library support for `aarch64-unknown-linux-pauthtest`
jchlanda May 4, 2026
1a7135c
Use target_env = "musl" & target_abi = "pauthtest" instead of env
jchlanda May 11, 2026
d0b4c46
Update landing pad to use addr()
jchlanda Jun 3, 2026
038cb8d
Use rust_force_inline on sign_lpad function
jchlanda Jul 3, 2026
b749630
Set correct cfg_select for sign_lpad
jchlanda Jul 6, 2026
14bb27e
add more tests for suggesting fn parameters
chenyukang Jul 7, 2026
2efdc66
Carry the `b_offset` inside `BackendRepr::ScalarPair`
scottmcm Jul 1, 2026
ad575fe
Oh yeah, clippy too
scottmcm Jul 1, 2026
ef6ad0d
Oh, miri for a different target
scottmcm Jul 1, 2026
870c4ca
chore: add codegen test for range length bound propagation
amirHdev Jul 7, 2026
6b205c6
Update `browser-ui-test` version to `0.24.1`
GuillaumeGomez Jul 7, 2026
99c8cf8
Add align requirement in _mm_stream_si32 and _mm_stream_si64
yilin0518 Jul 7, 2026
9e394da
Update wasm-component-ld to 0.5.26
alexcrichton Jul 7, 2026
865fb57
std: merge the unix-like io::error modules into one file
valentynkit Jul 7, 2026
24fb2fb
add core test run with `-Zforce-intrinsic-fallback`
folkertdev Jul 7, 2026
7a28eed
wrapping_sh* methods: clarify underspecified reference
RalfJung Jul 7, 2026
5d96f17
Do not build the compiler when invoking `x perf compare`
Kobzol Jul 7, 2026
d2ee4ca
rustdoc: Represent `--output-format=json` coverage and ir differently
aDotInTheVoid Mar 27, 2026
594e737
std: support real fd methods on Emscripten
guybedford Jul 8, 2026
f4db0a9
Emit the emscripten entry point as `__main_argc_argv`
guybedford Jul 8, 2026
6a9fb2d
Add regression test for CString::clone_into unwind safety
Vastargazing Jul 8, 2026
47a510b
Tweak `write_immediate_to_mplace_no_validate` to be more consistent w…
scottmcm Jul 7, 2026
dd26311
disable `icx` CI run
folkertdev Jul 8, 2026
9fa33b1
add relnotes for 1.97.0
BoxyUwU Jul 8, 2026
62fda0a
Merge pull request #2185 from folkertdev/disable-icx
davidtwco Jul 8, 2026
8118399
Attempt to run parallel frontend CI
heinwol Jul 8, 2026
6236baf
Merge pull request #2183 from yilin0518/main
folkertdev Jul 8, 2026
66ebb4f
ci: use `llvm-22.1.4-x86_64.tar.gz` mirrored in `ci-mirrors`
jieyouxu Jul 8, 2026
f7a6c99
cleanup: upstream dropped AMX-TF32
krasimirgg Jul 8, 2026
8fa04ef
Merge pull request #2186 from jieyouxu/jieyouxu/mirror/stdarch
folkertdev Jul 8, 2026
15f9829
update comments
guybedford Jul 8, 2026
465e429
Merge pull request #2184 from krasimirgg/jul26-drop-amx-tf32
folkertdev Jul 8, 2026
40251d7
Add regression test for too-big byval ABI args
Ap4sh Jul 8, 2026
09f5eb5
Rollup merge of #158871 - BoxyUwU:relnotes_1_97_0, r=mark-simulacrum
jhpratt Jul 9, 2026
02867e5
Rollup merge of #158968 - folkertdev:stdarch-sync-2026-07-08, r=folke…
jhpratt Jul 9, 2026
bfcf048
Rollup merge of #154445 - aDotInTheVoid:better-enum, r=Urgau
jhpratt Jul 9, 2026
b48dc8e
Rollup merge of #157153 - joboet:global_allocator, r=nia-e
jhpratt Jul 9, 2026
2302977
Rollup merge of #158495 - Shourya742:2026-06-27-rename-tflag, r=BoxyU…
jhpratt Jul 9, 2026
83a13e4
Rollup merge of #158666 - scottmcm:scalar-but-packed, r=workingjubilee
jhpratt Jul 9, 2026
1ad5e14
Rollup merge of #158870 - valentynkit:posix-io-error-single-file, r=j…
jhpratt Jul 9, 2026
d26b57b
Rollup merge of #158920 - alexcrichton:update-wasm-component-ld, r=lqd
jhpratt Jul 9, 2026
2b93874
Rollup merge of #158926 - RalfJung:wrapping_sh, r=Darksonn
jhpratt Jul 9, 2026
498316c
Rollup merge of #158927 - folkertdev:test-fallback-bodies, r=folkertdev
jhpratt Jul 9, 2026
54f6ba5
Rollup merge of #158932 - Kobzol:x-compare-dont-build-rustc, r=clubby789
jhpratt Jul 9, 2026
2481723
Rollup merge of #158937 - guybedford:emscripten-pthread-main, r=bjorn3
jhpratt Jul 9, 2026
e4f3a96
Rollup merge of #151379 - cammeresi:20260119-trunc, r=clarfonthey
jhpratt Jul 9, 2026
b21e0c1
Rollup merge of #156144 - hkBst:improve-partial-eq-docs, r=nia-e
jhpratt Jul 9, 2026
91df26d
Rollup merge of #156548 - jchlanda:jakub/pac_lib, r=davidtwco
jhpratt Jul 9, 2026
af64021
Rollup merge of #157995 - m4dh0rs3:main, r=Mark-Simulacrum
jhpratt Jul 9, 2026
fc6d42b
Rollup merge of #158307 - heinwol:parallel-frontend-CI, r=jieyouxu
jhpratt Jul 9, 2026
2408cb1
Rollup merge of #158741 - WaffleLapkin:into_flat_iter_noa, r=hanna-kr…
jhpratt Jul 9, 2026
79e52e3
Rollup merge of #158807 - Vastargazing:tests/cstr-clone-into-alloc-er…
jhpratt Jul 9, 2026
fa59de0
Rollup merge of #158862 - chenyukang:yukang-fix-131084-self-receiver-…
jhpratt Jul 9, 2026
c27a2ac
Rollup merge of #158894 - bal-e:ambiguity-nt-ordering, r=nnethercote
jhpratt Jul 9, 2026
c8256d6
Rollup merge of #158902 - amirHdev:add-codegen-test-range-len-try-fro…
jhpratt Jul 9, 2026
08dbc98
Rollup merge of #158913 - GuillaumeGomez:update-browser-ui-test, r=ji…
jhpratt Jul 9, 2026
f4930ac
Rollup merge of #158935 - guybedford:emscripten-owned-fd, r=jhpratt
jhpratt Jul 9, 2026
7c193ca
Rollup merge of #158978 - Ap4sh:ap4sh/issue-148853-abi-layout-test, r…
jhpratt Jul 9, 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
60 changes: 30 additions & 30 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6213,9 +6213,9 @@ dependencies = [

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

[[package]]
name = "wasip2"
Expand Down Expand Up @@ -6282,9 +6282,9 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.25"
version = "0.5.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee72c06c556db23aca2d29e1e183d96efdffa7110b24915629a5091de600a894"
checksum = "51a12709376d4ce64f472699500db3b0e5902cc2bef16fb6ca3098bfdac032fa"
dependencies = [
"anyhow",
"clap",
Expand All @@ -6293,12 +6293,12 @@ dependencies = [
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
"wat",
"windows-sys 0.61.2",
"winsplit",
"wit-component 0.252.0",
"wit-parser 0.252.0",
"wit-component 0.253.0",
"wit-parser 0.253.0",
]

[[package]]
Expand Down Expand Up @@ -6330,12 +6330,12 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8185ae345fa5687c054626ff9a50e7089797a343d9904d1dc9820eb4c4d3196f"
checksum = "59972d6cd272259de647b7c1f1912e45e289c75ffd4be04e10695507cd7e1b59"
dependencies = [
"leb128fmt",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
]

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

[[package]]
name = "wasm-metadata"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b7e08e02a3cd55bf778009d4cd6faae50da011f293644daf78a531a32d6d142"
checksum = "b3f45816ef616806f48498bcd831377de578c4fa51db0c83ab8ceb78cc13523b"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.252.0",
"wasmparser 0.252.0",
"wasm-encoder 0.253.0",
"wasmparser 0.253.0",
]

[[package]]
Expand Down Expand Up @@ -6396,9 +6396,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3eb099dcadcde5be9eef55e3a337128efd4e44b4c93122487e4d2e4e1c6627c"
checksum = "19db11f87d2486580e1e8b6f494c54df7e0566b87d0b599db843c24019667339"
dependencies = [
"bitflags",
"hashbrown 0.17.0",
Expand All @@ -6409,22 +6409,22 @@ dependencies = [

[[package]]
name = "wast"
version = "252.0.0"
version = "253.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "942a3449d6a593fccc111a6241c8df52bda168af30e40bf9580d4394d7374c65"
checksum = "d3264542f8965c5d84fb1085d924bfba9a6314bb228eff13a2de14d7627664d0"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.2",
"wasm-encoder 0.252.0",
"wasm-encoder 0.253.0",
]

[[package]]
name = "wat"
version = "1.252.0"
version = "1.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c72a4ba7088f7bac94cf516e49882bdf97068904a563768cf249efc839ec42cb"
checksum = "4bfc5ce906144200c972ec617470aa35bd847472e170b26dde3e80541c674055"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6872,9 +6872,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76db0662b590f45d33d0e363fa13539a5a1eecd35d5a12fe208c335461c1053d"
checksum = "dbbd2500ac3488489ee8c6e59b79d7e47e6da5bfb019efd35d5dca57b78af624"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6883,10 +6883,10 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.252.0",
"wasm-metadata 0.252.0",
"wasmparser 0.252.0",
"wit-parser 0.252.0",
"wasm-encoder 0.253.0",
"wasm-metadata 0.253.0",
"wasmparser 0.253.0",
"wit-parser 0.253.0",
]

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

[[package]]
name = "wit-parser"
version = "0.252.0"
version = "0.253.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4266bea110371c620ccf3201c5023676046bc4556e5c7cfb5d500bda5ebc162d"
checksum = "4d997b8e5920fcbeec742b58e583325d6419a6aca617ae8075c406a61c65ba8a"
dependencies = [
"anyhow",
"hashbrown 0.17.0",
Expand All @@ -6923,7 +6923,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-ident",
"wasmparser 0.252.0",
"wasmparser 0.253.0",
]

[[package]]
Expand Down
90 changes: 90 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,93 @@
Version 1.97.0 (2026-07-09)
==========================

<a id="1.97.0-Language"></a>

Language
--------
- [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)
- [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)
- [Stabilize the `div32`, `lam-bh`, `lamcas`, `ld-seq-sa` and `scq` target features](https://github.com/rust-lang/rust/pull/154510)
- [Stabilize `cfg(target_has_atomic_primitive_alignment)`](https://github.com/rust-lang/rust/pull/155006)
- [Allow trailing `self` in imports in more cases](https://github.com/rust-lang/rust/pull/155137)


<a id="1.97.0-Platform-Support"></a>

Platform Support
----------------
- [nvptx64-nvidia-cuda: drop support for old architectures and old ISAs](https://github.com/rust-lang/rust/pull/152443)


Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html


<a id="1.97.0-Stabilized-APIs"></a>

Stabilized APIs
---------------

- [`Default for RepeatN`](https://doc.rust-lang.org/stable/std/iter/struct.RepeatN.html#impl-Default-for-RepeatN%3CA%3E)
- [`Copy for ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/std/ffi/struct.FromBytesUntilNulError.html#impl-Copy-for-FromBytesUntilNulError)
- [`Send for std::fs::File` on UEFI](https://github.com/rust-lang/rust/pull/154003)
- [`<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_highest_one)
- [`<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_lowest_one)
- [`<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.highest_one)
- [`<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.lowest_one)
- [`<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.bit_width)
- [`NonZero<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_highest_one)
- [`NonZero<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_lowest_one)
- [`NonZero<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.highest_one)
- [`NonZero<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.lowest_one)
- [`NonZero<{integer}>::bit_width`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.bit_width)


These previously stable APIs are now stable in const contexts:

- [`char::is_control`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_control)


<a id="1.97.0-Cargo"></a>

Cargo
-----
- [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)
- [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)
- [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.
- [Add `-m` shorthand for `--manifest-path`](https://github.com/rust-lang/cargo/pull/16858)
- [Remove `curl` dependency from `crates-io` crate](https://github.com/rust-lang/cargo/pull/16936)

<a id="1.97.0-Rustdoc"></a>

Rustdoc
-----
- [Stabilize `--emit` flag](https://github.com/rust-lang/rust/pull/146220)
- [Stabilize `--remap-path-prefix`](https://github.com/rust-lang/rust/pull/155307)


<a id="1.97.0-Compatibility-Notes"></a>

Compatibility Notes
-------------------
- [Emit a future-compatibility warning when relying on `f32: From<{float}>` to constrain `{float}`](https://github.com/rust-lang/rust/pull/139087)
- [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.
- [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.
- [Deprecate `std::char` constants and functions](https://github.com/rust-lang/rust/pull/153873)
- [Warn on linker output by default](https://github.com/rust-lang/rust/pull/153968)
- [Remove hidden `f64` methods which have been deprecated since 1.0](https://github.com/rust-lang/rust/pull/153975)
- [report the `varargs_without_pattern` lint in deps](https://github.com/rust-lang/rust/pull/154599)
- [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)
- [Error on invalid macho `link_section` specifier](https://github.com/rust-lang/rust/pull/155065)
- 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.
- [Error on `#[export_name = "..."]` where the name is empty](https://github.com/rust-lang/rust/pull/155515)
- [Syntactically reject tuple index shorthands in struct patterns](https://github.com/rust-lang/rust/pull/155698)
- [validate `#[link_name = "..."]` & `#[link(name = "...")]` parameters](https://github.com/rust-lang/rust/pull/155817)
- 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)


Version 1.96.1 (2026-06-30)
===========================

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/callconv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
unreachable!("`homogeneous_aggregate` should not be called for scalable vectors")
}

BackendRepr::ScalarPair(..) | BackendRepr::Memory { sized: true } => {
BackendRepr::ScalarPair { .. } | BackendRepr::Memory { sized: true } => {
// Helper for computing `homogeneous_aggregate`, allowing a custom
// starting offset (used below for handling variants).
let from_fields_at =
Expand Down
24 changes: 16 additions & 8 deletions compiler/rustc_abi/src/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
Err(AbiMismatch) | Ok(None) => BackendRepr::Memory { sized: true },
Ok(Some((repr, _))) => match repr {
// Mismatched alignment (e.g. union is #[repr(packed)]): disable opt
BackendRepr::Scalar(_) | BackendRepr::ScalarPair(_, _)
BackendRepr::Scalar(_) | BackendRepr::ScalarPair { .. }
if repr.scalar_platform_align(dl).unwrap() != align =>
{
BackendRepr::Memory { sized: true }
Expand All @@ -489,7 +489,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}
// the alignment tests passed and we can use this
BackendRepr::Scalar(..)
| BackendRepr::ScalarPair(..)
| BackendRepr::ScalarPair { .. }
| BackendRepr::SimdVector { .. }
| BackendRepr::SimdScalableVector { .. }
| BackendRepr::Memory { .. } => repr,
Expand Down Expand Up @@ -558,7 +558,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
};
match &mut st.backend_repr {
BackendRepr::Scalar(scalar) => hide_niches(scalar),
BackendRepr::ScalarPair(a, b) => {
BackendRepr::ScalarPair { a, b, b_offset: _ } => {
hide_niches(a);
hide_niches(b);
}
Expand Down Expand Up @@ -701,13 +701,21 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// When the total alignment and size match, we can use the
// same ABI as the scalar variant with the reserved niche.
BackendRepr::Scalar(_) => BackendRepr::Scalar(niche_scalar),
BackendRepr::ScalarPair(first, second) => {
BackendRepr::ScalarPair { a: first, b: second, b_offset } => {
// Only the niche is guaranteed to be initialised,
// so use union layouts for the other primitive.
if niche_offset == Size::ZERO {
BackendRepr::ScalarPair(niche_scalar, second.to_union())
BackendRepr::ScalarPair {
a: niche_scalar,
b: second.to_union(),
b_offset,
}
} else {
BackendRepr::ScalarPair(first.to_union(), niche_scalar)
BackendRepr::ScalarPair {
a: first.to_union(),
b: niche_scalar,
b_offset,
}
}
}
_ => BackendRepr::Memory { sized: true },
Expand Down Expand Up @@ -1037,7 +1045,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
// If we pick a "clever" (by-value) ABI, we might have to adjust the ABI of the
// variants to ensure they are consistent. This is because a downcast is
// semantically a NOP, and thus should not affect layout.
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair(..)) {
if matches!(abi, BackendRepr::Scalar(..) | BackendRepr::ScalarPair { .. }) {
for variant in &mut layout_variants {
// We only do this for variants with fields; the others are not accessed anyway.
// Also do not overwrite any already existing "clever" ABIs.
Expand Down Expand Up @@ -1354,7 +1362,7 @@ impl<Cx: HasDataLayout> LayoutCalculator<Cx> {
}
// But scalar pairs are Rust-specific and get
// treated as aggregates by C ABIs anyway.
BackendRepr::ScalarPair(..) => {
BackendRepr::ScalarPair { .. } => {
abi = field.backend_repr;
}
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_abi/src/layout/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<FieldIdx: Idx, VariantIdx: Idx> LayoutData<FieldIdx, VariantIdx> {
offsets: [Size::ZERO, b_offset].into(),
in_memory_order: [FieldIdx::new(0), FieldIdx::new(1)].into(),
},
backend_repr: BackendRepr::ScalarPair(a, b),
backend_repr: BackendRepr::ScalarPair { a, b, b_offset },
largest_niche,
uninhabited: false,
align: AbiAlign::new(align),
Expand Down
Loading
Loading