You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while avoiding breaking consumers needing compatibility with older toolchains.
28
+
while avoiding breaking consumers who want to use older Rust compilers.
29
29
30
30
You can opt-in to the MSRV-aware resolver via [`.cargo/config.toml`](https://doc.rust-lang.org/cargo/reference/config.html#resolverincompatible-rust-versions):
31
+
31
32
```toml
32
33
[resolver]
33
34
incompatible-rust-versions = "fallback"
34
35
```
36
+
35
37
Then when adding a dependency:
38
+
36
39
```console
37
40
$ cargo add clap
38
41
Updating crates.io index
@@ -44,6 +47,7 @@ warning: ignoring clap@4.5.23 (which requires rustc 1.74) to maintain demo's rus
44
47
```
45
48
46
49
When [verifying the latest dependencies in CI](https://doc.rust-lang.org/cargo/guide/continuous-integration.html#verifying-latest-dependencies), you can override this:
@@ -60,10 +64,10 @@ toolchain (and avoid running `cargo update`). Now, those users will be able to
60
64
automatically use older library versions compatible with their older toolchain.
61
65
In the future, we expect this to provide more flexibility for library authors
62
66
to select their preferred support strategy for Rust versions, with the toolchain
63
-
helping users on older toolchains avoid breakage.
67
+
helping users on older toolchains avoid breakage. See also the [detailed guidance](https://doc.rust-lang.org/beta/cargo/reference/rust-version.html#setting-and-updating-rust-version)
68
+
on what to consider when making a choice of supported version.
64
69
65
-
The new resolver will be enabled by default with the 2024 edition (expected to
66
-
stabilize in 1.85), but can be enabled as of 1.84 by setting
70
+
The new resolver will be enabled by default when optin into the 2024 edition (will stabilize in 1.85), but can be enabled as of 1.84 by setting
67
71
[`package.resolver = "3"`](https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions) in the Cargo.toml manifest file, or
68
72
[`resolver.incompatible-rust-versions = "fallback"`](https://doc.rust-lang.org/cargo/reference/config.html#resolverincompatible-rust-versions) in the Cargo configuration file.
69
73
@@ -93,7 +97,7 @@ engine used relatively esoteric code. It also improves our ability to detect
93
97
where impls do *not* overlap, allowing more code to be written in some cases.
94
98
95
99
For more details, see a [previous blog post](https://blog.rust-lang.org/inside-rust/2024/12/04/trait-system-refactor-initiative.html)
96
-
and the [stabilization report](https://github.com/rust-lang/rust/pull/130654)
100
+
and the [stabilization report](https://github.com/rust-lang/rust/pull/130654).
0 commit comments