Skip to content

Commit 37cf83a

Browse files
authored
Merge pull request rust-lang#22540 from lnicola/sync-from-rust
minor: sync from downstream
2 parents cea07bd + 06ea496 commit 37cf83a

2,448 files changed

Lines changed: 115047 additions & 74513 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.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
github: rustfoundation
12
custom: ["rust-lang.org/funding"]

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
[submodule "src/llvm-project"]
2626
path = src/llvm-project
2727
url = https://github.com/rust-lang/llvm-project.git
28-
branch = rustc/22.1-2026-03-22
28+
branch = rustc/22.1-2026-05-19
2929
shallow = true
3030
[submodule "src/doc/embedded-book"]
3131
path = src/doc/embedded-book

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ Philipp Matthias Schäfer <philipp.matthias.schaefer@posteo.de>
569569
phosphorus <steepout@qq.com>
570570
Pierre Krieger <pierre.krieger1708@gmail.com>
571571
pierwill <pierwill@users.noreply.github.com> <19642016+pierwill@users.noreply.github.com>
572+
Pieter-Louis Schoeman <pl.schoeman44@gmail.com> <127837395+P8L1@users.noreply.github.com>
572573
Pietro Albini <pietro@pietroalbini.org> <pietro@pietroalbini.io>
573574
Pietro Albini <pietro@pietroalbini.org> <pietro.albini@ferrous-systems.com>
574575
Pradyumna Rahul <prkinformed@gmail.com>

Cargo.lock

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
660660

661661
[[package]]
662662
name = "clippy"
663-
version = "0.1.97"
663+
version = "0.1.98"
664664
dependencies = [
665665
"anstream",
666666
"askama",
@@ -687,7 +687,7 @@ dependencies = [
687687

688688
[[package]]
689689
name = "clippy_config"
690-
version = "0.1.97"
690+
version = "0.1.98"
691691
dependencies = [
692692
"clippy_utils",
693693
"itertools",
@@ -711,7 +711,7 @@ dependencies = [
711711

712712
[[package]]
713713
name = "clippy_lints"
714-
version = "0.1.97"
714+
version = "0.1.98"
715715
dependencies = [
716716
"arrayvec",
717717
"cargo_metadata 0.23.1",
@@ -743,7 +743,7 @@ dependencies = [
743743

744744
[[package]]
745745
name = "clippy_utils"
746-
version = "0.1.97"
746+
version = "0.1.98"
747747
dependencies = [
748748
"arrayvec",
749749
"itertools",
@@ -1148,7 +1148,7 @@ checksum = "a0afaad2b26fa326569eb264b1363e8ae3357618c43982b3f285f0774ce76b69"
11481148

11491149
[[package]]
11501150
name = "declare_clippy_lint"
1151-
version = "0.1.97"
1151+
version = "0.1.98"
11521152

11531153
[[package]]
11541154
name = "derive-where"
@@ -4010,6 +4010,7 @@ dependencies = [
40104010
name = "rustc_feature"
40114011
version = "0.0.0"
40124012
dependencies = [
4013+
"rustc_ast",
40134014
"rustc_data_structures",
40144015
"rustc_hir",
40154016
"rustc_span",
@@ -4755,6 +4756,7 @@ dependencies = [
47554756
name = "rustc_target"
47564757
version = "0.0.0"
47574758
dependencies = [
4759+
"arrayvec",
47584760
"bitflags",
47594761
"object 0.37.3",
47604762
"rustc_abi",
@@ -5430,9 +5432,9 @@ dependencies = [
54305432

54315433
[[package]]
54325434
name = "sysinfo"
5433-
version = "0.39.0"
5435+
version = "0.39.2"
54345436
source = "registry+https://github.com/rust-lang/crates.io-index"
5435-
checksum = "cd9f9fe3d2b7b75cf4f2805e5b9926e8ac47146667b16b86298c4a8bf08cc469"
5437+
checksum = "14311e7e9a03114cd4b65eedd54e8fed2945e17f08586ae97ef53bc0669f9581"
54365438
dependencies = [
54375439
"libc",
54385440
"objc2-core-foundation",
@@ -6068,6 +6070,7 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
60686070
name = "unicode-table-generator"
60696071
version = "0.1.0"
60706072
dependencies = [
6073+
"rustc-hash 2.1.1",
60716074
"ucd-parse",
60726075
]
60736076

RELEASES.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,97 @@
1+
Version 1.96.0 (2026-05-28)
2+
==========================
3+
4+
<a id="1.96.0-Language"></a>
5+
6+
Language
7+
--------
8+
- [Allow passing `expr` metavariable to `cfg`](https://github.com/rust-lang/rust/pull/146961)
9+
- [Always coerce never types in tuple expressions](https://github.com/rust-lang/rust/pull/147834)
10+
- [Avoid incorrect inference guidance of function arguments in rare cases](https://github.com/rust-lang/rust/pull/150316)
11+
- [Support s390x vector registers in inline assembly](https://github.com/rust-lang/rust/pull/154184)
12+
- [Allow using constants of type `ManuallyDrop` as patterns (fixing a regression introduced in 1.94.0)](https://github.com/rust-lang/rust/pull/154891)
13+
14+
<a id="1.96.0-Compiler"></a>
15+
16+
Compiler
17+
--------
18+
- [Enable link relaxation feature for LoongArch Linux targets](https://github.com/rust-lang/rust/pull/153427)
19+
- [Update `riscv64gc-unknown-fuchsia` baseline to RVA22 + vector](https://github.com/rust-lang/rust/pull/155072)
20+
21+
<a id="1.96.0-Libraries"></a>
22+
23+
Libraries
24+
---------
25+
- [Support iterating over ranges of `NonZero` integers](https://github.com/rust-lang/rust/pull/127534)
26+
- [refactor 'valid for read/write' definition: exclude null; add that as an exception on individual methods instead](https://github.com/rust-lang/rust/pull/152615)
27+
- [Fix SGX delayed host lookup via ToSocketAddr](https://github.com/rust-lang/rust/pull/152851)
28+
29+
<a id="1.96.0-Stabilized-APIs"></a>
30+
31+
Stabilized APIs
32+
---------------
33+
34+
- [`assert_matches!`](https://doc.rust-lang.org/stable/std/macro.assert_matches.html)
35+
- [`debug_assert_matches!`](https://doc.rust-lang.org/stable/std/macro.debug_assert_matches.html)
36+
- [`From<T> for AssertUnwindSafe<T>`](https://doc.rust-lang.org/stable/std/panic/struct.AssertUnwindSafe.html#impl-From%3CT%3E-for-AssertUnwindSafe%3CT%3E)
37+
- [`From<T> for LazyCell<T, F>`](https://doc.rust-lang.org/stable/std/cell/struct.LazyCell.html#impl-From%3CT%3E-for-LazyCell%3CT,+F%3E)
38+
- [`From<T> for LazyLock<T, F>`](https://doc.rust-lang.org/stable/std/sync/struct.LazyLock.html#impl-From%3CT%3E-for-LazyLock%3CT,+F%3E)
39+
- [`core::range::RangeToInclusive`](https://doc.rust-lang.org/stable/core/range/struct.RangeToInclusive.html)
40+
- [`core::range::RangeToInclusiveIter`](https://doc.rust-lang.org/stable/core/range/struct.RangeToInclusiveIter.html)
41+
- [`core::range::RangeFrom`](https://doc.rust-lang.org/stable/core/ops/struct.RangeFrom.html)
42+
- [`core::range::RangeFromIter`](https://doc.rust-lang.org/stable/core/ops/struct.RangeFromIter.html)
43+
- [`core::range::Range`](https://doc.rust-lang.org/stable/std/range/struct.Range.html)
44+
- [`core::range::RangeIter`](https://doc.rust-lang.org/stable/std/range/struct.RangeIter.html)
45+
46+
<a id="1.96.0-Cargo"></a>
47+
48+
Cargo
49+
-----
50+
- [Allow a dependency to specify both a git repository and an alternate registry.](https://github.com/rust-lang/cargo/pull/16810/) Just like with crates.io, the git repository will be used locally, but the registry version will be used when published.
51+
- [Added `target.'cfg(..)'.rustdocflags` support in configuration.](https://github.com/rust-lang/cargo/pull/16846)
52+
- Fixed [CVE-2026-5222](https://blog.rust-lang.org/2026/05/25/cve-2026-5222/) and [CVE-2026-5223](https://blog.rust-lang.org/2026/05/25/cve-2026-5223/).
53+
54+
<a id="1.96-Rustdoc"></a>
55+
56+
Rustdoc
57+
-----
58+
- [Deprecation notes are now rendered like any other documentation](https://github.com/rust-lang/rust/pull/149931). Previously they used the css `white-space: pre-wrap;` property and stripped any `<p>` elements from the rendered html, however this caused issues and unintuitive behavior. The new behavior should be more predictable, however some multi-line deprecation notes will now be rendered as as single lines. If this is undesirable, you can use the standard markdown method of forcing a linebreak, which is two spaces followed by a newline (`"\n"`).
59+
- [Don't emit rustdoc `missing_doc_code_examples` lint on impl items](https://github.com/rust-lang/rust/pull/154048)
60+
- [Separate methods and associated functions in sidebar](https://github.com/rust-lang/rust/pull/154644)
61+
62+
<a id="1.96.0-Compatibility-Notes"></a>
63+
64+
Compatibility Notes
65+
-------------------
66+
- [Fix layout of `#[repr(Int)]` enums in some edge cases involving fields of uninhabited zero-sized types](https://github.com/rust-lang/rust/pull/146989)
67+
- [Prevent unsize-coercing into `Pin<Foo>` where `Foo` doesn't implement `Deref`. Some such coercions were previously allowed, but produce a type with no useful public API.](https://github.com/rust-lang/rust/pull/149218)
68+
- [rustc: Stop passing `--allow-undefined` on wasm targets](https://github.com/rust-lang/rust/pull/149868)
69+
- [Gate the accidentally stabilized `#![reexport_test_harness_main]` attribute](https://github.com/rust-lang/rust/pull/152210)
70+
- [Error on return-position-impl-trait-in-traits whose types are too private](https://github.com/rust-lang/rust/pull/152543)
71+
- [Report the `uninhabited_static` lint in dependencies and make it deny-by-default](https://github.com/rust-lang/rust/pull/152853)
72+
- [Distributed builds now contain non-split debuginfo for windows-gnu](https://github.com/rust-lang/rust/pull/152870)
73+
This appears to improve the quality of backtraces. This change has no effect on the defaults for the output of rustc/cargo on these targets.
74+
- [Check const generic arguments are correctly typed in more positions](https://github.com/rust-lang/rust/pull/152931)
75+
- [Remove `-Csoft-float`](https://github.com/rust-lang/rust/pull/152973)
76+
- [Importing structs with `::{self [as name]}`, e.g., `struct S {}; use S::{self as Other};`, is now no longer permitted because `{self}` imports require a module parent.](https://github.com/rust-lang/rust/pull/152996)
77+
- [For `export_name`, `link_name`, and `link_section` attributes, if multiple of the same attribute is present, the first one now takes precedence.](https://github.com/rust-lang/rust/pull/153041)
78+
- [Update the minimum external LLVM to 21](https://github.com/rust-lang/rust/pull/153684)
79+
- On `avr` targets, C's `double` type is 32-bit by default, so [change `c_double` to `f32` on `avr` targets to match](https://github.com/rust-lang/rust/pull/154647). This is a breaking change, but necessary to make `c_double` match C's double.
80+
- [`BTreeMap::append()` was optimized, which may now cause panics for types with incorrect `Ord` impls](https://github.com/rust-lang/rust/pull/153107)
81+
82+
<a id="1.96.0-Internal-Changes"></a>
83+
84+
Internal Changes
85+
----------------
86+
87+
These changes do not affect any public interfaces of Rust, but they represent
88+
significant improvements to the performance or internals of rustc and related
89+
tools.
90+
91+
- [JSON targets: `aarch64` softfloat targets now have to have `rustc_abi` set to `"softfloat"`](https://github.com/rust-lang/rust/pull/152941)
92+
- [target specs: stricter checks for LLVM ABI values, and correlate that with `cfg(target_abi)`](https://github.com/rust-lang/rust/pull/153769)
93+
94+
195
Version 1.95.0 (2026-04-16)
296
===========================
397

compiler/rustc_abi/src/canon_abi.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub enum CanonAbi {
2828
Rust,
2929
RustCold,
3030
RustPreserveNone,
31+
RustTail,
3132

3233
/// An ABI that rustc does not know how to call or define.
3334
Custom,
@@ -59,7 +60,10 @@ pub enum CanonAbi {
5960
impl CanonAbi {
6061
pub fn is_rustic_abi(self) -> bool {
6162
match self {
62-
CanonAbi::Rust | CanonAbi::RustCold | CanonAbi::RustPreserveNone => true,
63+
CanonAbi::Rust
64+
| CanonAbi::RustCold
65+
| CanonAbi::RustPreserveNone
66+
| CanonAbi::RustTail => true,
6367
CanonAbi::C
6468
| CanonAbi::Custom
6569
| CanonAbi::Swift
@@ -81,6 +85,7 @@ impl fmt::Display for CanonAbi {
8185
CanonAbi::Rust => ExternAbi::Rust,
8286
CanonAbi::RustCold => ExternAbi::RustCold,
8387
CanonAbi::RustPreserveNone => ExternAbi::RustPreserveNone,
88+
CanonAbi::RustTail => ExternAbi::RustTail,
8489
CanonAbi::Custom => ExternAbi::Custom,
8590
CanonAbi::Swift => ExternAbi::Swift,
8691
CanonAbi::Arm(arm_call) => match arm_call {

compiler/rustc_abi/src/extern_abi.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ pub enum ExternAbi {
4949
/// forcing callers to save all registers.
5050
RustPreserveNone,
5151

52+
/// Ensures that calls in tail position can always be optimized into a jump.
53+
///
54+
/// This ABI is not stable, and relies on LLVM implementation details.
55+
RustTail,
56+
5257
/// Unstable impl detail that directly uses Rust types to describe the ABI to LLVM.
5358
/// Even normally-compatible Rust types can become ABI-incompatible with this ABI!
5459
Unadjusted,
@@ -205,6 +210,7 @@ abi_impls! {
205210
System { unwind: true } =><= "system-unwind",
206211
SysV64 { unwind: false } =><= "sysv64",
207212
SysV64 { unwind: true } =><= "sysv64-unwind",
213+
RustTail =><= "tail",
208214
Thiscall { unwind: false } =><= "thiscall",
209215
Thiscall { unwind: true } =><= "thiscall-unwind",
210216
Unadjusted =><= "unadjusted",
@@ -280,7 +286,7 @@ impl ExternAbi {
280286
/// - are subject to change between compiler versions
281287
pub fn is_rustic_abi(self) -> bool {
282288
use ExternAbi::*;
283-
matches!(self, Rust | RustCall | RustCold | RustPreserveNone)
289+
matches!(self, Rust | RustCall | RustCold | RustPreserveNone | RustTail)
284290
}
285291

286292
/// Returns whether the ABI supports C variadics. This only controls whether we allow *imports*
@@ -354,6 +360,7 @@ impl ExternAbi {
354360
| Self::SysV64 { .. }
355361
| Self::Win64 { .. }
356362
| Self::RustPreserveNone
363+
| Self::RustTail
357364
| Self::Swift => true,
358365
}
359366
}

0 commit comments

Comments
 (0)