Skip to content

Commit fcb9e61

Browse files
Update posts/2025-01-09-Rust-1.84.0.md
Co-authored-by: Ed Page <eopage@gmail.com>
1 parent 8297755 commit fcb9e61

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

posts/2025-01-09-Rust-1.84.0.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,30 @@ aware selection allows library authors to easily adopt newer Rust versions
2828
while allowing consumers of the library to automatically use old versions
2929
if they need compatibility with older toolchains.
3030

31+
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):
32+
```toml
33+
[resolver]
34+
incompatible-rust-versions = "fallback"
35+
```
36+
Then when adding a dependency:
37+
```console
38+
$ cargo add clap
39+
Updating crates.io index
40+
warning: ignoring clap@4.5.23 (which requires rustc 1.74) to maintain demo's rust-version of 1.60
41+
Adding clap v4.0.32 to dependencies
42+
Updating crates.io index
43+
Locking 33 packages to latest Rust 1.60 compatible versions
44+
Adding clap v4.0.32 (available: v4.5.23, requires Rust 1.74)
45+
```
46+
47+
When [verifying the latest dependencies in CI](https://doc.rust-lang.org/cargo/guide/continuous-integration.html#verifying-latest-dependencies), you can override this:
48+
```console
49+
$ CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=allow cargo update
50+
Updating crates.io index
51+
Locking 12 packages to latest compatible versions
52+
Updating clap v4.0.32 -> v4.5.23
53+
```
54+
3155
Library authors should take the MSRV-aware resolver into account when deciding
3256
their policy on adopting new Rust toolchain features. Previously, a library
3357
adopting features from a new Rust toolchain would force downstream users of

0 commit comments

Comments
 (0)