-
Notifications
You must be signed in to change notification settings - Fork 302
1.84.0 release post #1451
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
1.84.0 release post #1451
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bc1645b
1.84.0 post
Mark-Simulacrum 9a6cc07
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum 1326b7f
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum 021bd3d
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum e43da1e
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum 90aa1bb
Re-wrap text and avoid implying no worry is accurate
Mark-Simulacrum 332e566
Pull in previously proposed strict provenance text
Mark-Simulacrum a65cd81
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum 8297755
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum fcb9e61
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum bff69e3
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum aed6b43
Add stabilized APIs
Mark-Simulacrum d932634
Some more wording tweaks
Mark-Simulacrum dea677e
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum 51c8731
Import some suggestions
Mark-Simulacrum 81c2640
Update posts/2025-01-09-Rust-1.84.0.md
Mark-Simulacrum a70e577
Adjust some nits in trait solver text
Mark-Simulacrum 0f4dc87
Add `Pin::as_deref_mut` to stabilized APIs
BoxyUwU File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
layout: post | ||
title: "Announcing Rust 1.84.0" | ||
author: The Rust Release Team | ||
release: true | ||
--- | ||
|
||
The Rust team is happy to announce a new version of Rust, 1.84.0. Rust is a programming language empowering everyone to build reliable and efficient software. | ||
|
||
If you have a previous version of Rust installed via `rustup`, you can get 1.84.0 with: | ||
|
||
```console | ||
$ rustup update stable | ||
``` | ||
|
||
If you don't have it already, you can [get `rustup`](https://www.rust-lang.org/install.html) from the appropriate page on our website, and check out the [detailed release notes for 1.84.0](https://doc.rust-lang.org/stable/releases.html#version-1840-2025-01-09). | ||
|
||
If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (`rustup default beta`) or the nightly channel (`rustup default nightly`). Please [report](https://github.com/rust-lang/rust/issues/new/choose) any bugs you might come across! | ||
|
||
## What's in 1.84.0 stable | ||
|
||
### Cargo can use toolchain version for library version selection | ||
|
||
1.84.0 stabilizes the minimum supported Rust version (MSRV) aware resolver, | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
which uses the declared [minimum supported Rust version](https://doc.rust-lang.org/cargo/reference/rust-version.html) from | ||
dependencies, if available, to improve package version selection. Rust version | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
aware selection allows library authors to easily adopt newer Rust versions | ||
while providing library consumers a way to opt-in to using new package versions | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if they need compatibility with older toolchains. | ||
|
||
Library authors should start declaring their MSRV. Previously, bumping the | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version at each release to latest stable would force downstream consumers | ||
requiring an older Rust version to avoid running `cargo update` and/or require | ||
pinning the version of the library in use, but now those consumers will be able | ||
to automatically avoid pulling in new library versions if they want | ||
compatibility with an older toolchain. We expect this to provide more options | ||
for library authors for picking their preferred support strategy for Rust | ||
versions. | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The new resolver will be enabled by default with the 2024 edition (expected to | ||
stabilize in 1.85), but can be enabled as of 1.84 by setting | ||
`resolver.incompatible-rust-versions = "fallback"`. | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
pietroalbini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
TODO: Should we talk about resolver v3 and/or recommend that as the path to enabling instead? | ||
|
||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Read [the documentation](https://doc.rust-lang.org/cargo/reference/resolver.html#rust-version) for more details. | ||
|
||
### Migration to a new trait solver begins | ||
|
||
The Rust compiler is in the process of moving to a new implementation for the | ||
trait solver. The next-generation trait solver is a reimplementation of a core | ||
component of Rust's type system. It is not only responsible for checking | ||
whether trait-bounds - e.g. `Vec<T>: Clone` - hold, but is also used by many | ||
other parts of the type system, such as normalization - figuring out the | ||
underlying type of `<Vec<T> as IntoIterator>::Item` - and equating types | ||
(checking whether T and U are the same). | ||
Mark-Simulacrum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
In 1.84, the new solver is used for checking coherence of trait impls. At a | ||
high level, coherence is responsible for ensuring that there is at most one | ||
implementation of a trait for a given type, including *globally* in not yet | ||
written or visible code in downstream crates from the current compilation. | ||
|
||
This stabilization does include some breaking changes, primarily by fixing some | ||
correctness issues with the old solver. Typically these will show up as new | ||
"conflicting implementations of trait ..." errors that were not previously | ||
reported. We expect instances of this to be rare based on evaluation of | ||
available code through [Crater], as the soundness holes in the previous solving | ||
engine used relatively esoteric code. It also improves our ability to detect | ||
where impls do *not* overlap, allowing more code to be written in some cases. | ||
|
||
For more details, see a [previous blog post](https://blog.rust-lang.org/inside-rust/2024/12/04/trait-system-refactor-initiative.html) | ||
and the [stabilization report](https://github.com/rust-lang/rust/pull/130654) | ||
|
||
[Crater]: https://github.com/rust-lang/crater/ | ||
|
||
### Strict provenance APIs stabilized | ||
|
||
Pointers (this includes values of reference type) in Rust have two components. | ||
|
||
* The pointer's "address" says where in memory the pointer is currently pointing. | ||
* The pointer's "provenance" says where and when the pointer is allowed to access memory. | ||
|
||
In 1.84, a number of standard library functions are stabilized to permit | ||
explicitly manipulating the address and provenance parts of pointers, avoiding | ||
integer-to-pointer casts to side-step the inherent ambiguity of that operation. | ||
This benefits compiler optimizations, and it is pretty much a requirement for | ||
using tools like [Miri](https://github.com/rust-lang/miri) and architectures | ||
like [CHERI](https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/) that aim | ||
to detect and diagnose pointer misuse. | ||
|
||
We recommend that code generally be written against the strict provenance APIs | ||
when it needs to manipulate pointers. Rust code that doesn't cast integers to | ||
pointers is already staying within the bounds of strict provenance, though the | ||
usage of these APIs can make the programmer's intent clearer to tooling. | ||
|
||
See the [documentation](https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) | ||
for more details on these APIs. For more background, [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) | ||
lays out the rationale for having provenance. | ||
|
||
pietroalbini marked this conversation as resolved.
Show resolved
Hide resolved
|
||
### Stabilized APIs | ||
|
||
TODO, relnotes still in-progress for this section | ||
|
||
### Other changes | ||
|
||
Check out everything that changed in [Rust](https://github.com/rust-lang/rust/releases/tag/1.84.0), [Cargo](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-184-2025-01-09), and [Clippy](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-184). | ||
|
||
## Contributors to 1.84.0 | ||
|
||
Many people came together to create Rust 1.84.0. We couldn't have done it without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.84.0/) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.