Skip to content

Commit b5beaf8

Browse files
committed
Auto merge of #157042 - matthiaskrgr:rollup-Eh52xVf, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #156932 (relnotes for 1.96) - #157014 (Allow building the source tarballs while offline) - #157023 (`#[expect]` is an attribute valid for outer style)
2 parents 8f02e85 + 71cb365 commit b5beaf8

4 files changed

Lines changed: 113 additions & 0 deletions

File tree

RELEASES.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,96 @@
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.debug_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+
- [Seperate 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+
81+
<a id="1.96.0-Internal-Changes"></a>
82+
83+
Internal Changes
84+
----------------
85+
86+
These changes do not affect any public interfaces of Rust, but they represent
87+
significant improvements to the performance or internals of rustc and related
88+
tools.
89+
90+
- [JSON targets: `aarch64` softfloat targets now have to have `rustc_abi` set to `"softfloat"`](https://github.com/rust-lang/rust/pull/152941)
91+
- [target specs: stricter checks for LLVM ABI values, and correlate that with `cfg(target_abi)`](https://github.com/rust-lang/rust/pull/153769)
92+
93+
194
Version 1.95.0 (2026-04-16)
295
===========================
396

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3497,6 +3497,7 @@ impl AttrItem {
34973497
|| self.path == sym::warn
34983498
|| self.path == sym::allow
34993499
|| self.path == sym::deny
3500+
|| self.path == sym::expect
35003501
}
35013502
}
35023503

src/bootstrap/src/core/build_steps/vendor.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ impl Step for Vendor {
114114
cmd.arg("--sync").arg(sync_arg);
115115
}
116116

117+
// Reuse vendored dependencies when building source tarball for offline support.
118+
if builder.config.vendor {
119+
cmd.arg("--respect-source-config")
120+
.arg("--config")
121+
.arg(builder.src.join(".cargo").join("config.toml"));
122+
}
123+
117124
// Will read the libstd Cargo.toml
118125
// which uses the unstable `public-dependency` feature.
119126
cmd.env("RUSTC_BOOTSTRAP", "1");
@@ -135,6 +142,13 @@ impl Step for Vendor {
135142
cmd.arg("--versioned-dirs");
136143
}
137144

145+
// Reuse vendored dependencies when building source tarball for offline support.
146+
if builder.config.vendor {
147+
cmd.arg("--respect-source-config")
148+
.arg("--config")
149+
.arg(builder.src.join("library").join(".cargo").join("config.toml"));
150+
}
151+
138152
// Will read the libstd Cargo.toml
139153
// which uses the unstable `public-dependency` feature.
140154
cmd.env("RUSTC_BOOTSTRAP", "1");

tests/ui/parser/const-block-items/inner-attr.stderr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ LL | fn main() {}
88
| ------------ the inner attribute doesn't annotate this function
99
|
1010
= note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
11+
help: to annotate the function, change the attribute from inner to outer style
12+
|
13+
LL - #![expect(unused)]
14+
LL + #[expect(unused)]
15+
|
1116

1217
error: aborting due to 1 previous error
1318

0 commit comments

Comments
 (0)