From bf7934f9517631f1aeb0b4e51eaaafcc3b8f0df9 Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Sat, 11 Jul 2026 00:35:55 +0800 Subject: [PATCH] Fix typo of key name `resolver.incompatible-rust-versions` --- src/rust-2024/cargo-resolver.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rust-2024/cargo-resolver.md b/src/rust-2024/cargo-resolver.md index a0982977..5e1791b5 100644 --- a/src/rust-2024/cargo-resolver.md +++ b/src/rust-2024/cargo-resolver.md @@ -8,11 +8,11 @@ Since Rust 1.84.0, Cargo has opt-in support for compatibility with [`package.rust-version`] to be considered when selecting dependency versions -by setting [`resolver.incompatible-rust-version = "fallback"`] in `.cargo/config.toml`. +by setting [`resolver.incompatible-rust-versions = "fallback"`] in `.cargo/config.toml`. Starting in Rust 2024, this will be the default. That is, writing `edition = "2024"` in `Cargo.toml` will imply `resolver = "3"` -which will imply [`resolver.incompatible-rust-version = "fallback"`]. +which will imply [`resolver.incompatible-rust-versions = "fallback"`]. The resolver is a global setting for a [workspace], and the setting is ignored in dependencies. The setting is only honored for the top-level package of the workspace. @@ -22,7 +22,7 @@ in the `[workspace]` definition if you want to opt in to the new resolver. For more details on how Rust-version aware dependency resolution works, see [the Cargo book](../../cargo/reference/resolver.html#rust-version). [`package.rust-version`]: ../../cargo/reference/rust-version.html -[`resolver.incompatible-rust-version = "fallback"`]: ../../cargo/reference/config.html#resolverincompatible-rust-versions +[`resolver.incompatible-rust-versions = "fallback"`]: ../../cargo/reference/config.html#resolverincompatible-rust-versions [workspace]: ../../cargo/reference/workspaces.html [virtual workspace]: ../../cargo/reference/workspaces.html#virtual-workspace [`resolver` field]: ../../cargo/reference/resolver.html#resolver-versions