File tree 2 files changed +26
-25
lines changed
2 files changed +26
-25
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ rpath = false # Sets the rpath linking option.
143
143
[profile .<name> .package .<name> ] # Override profile for a package.
144
144
# Same keys for a normal profile (minus `panic`, `lto`, and `rpath`).
145
145
146
+ [resolver ]
147
+ incompatible-rust-versions = " allow" # Specifies how resolver reacts to thes
148
+
146
149
[registries .<name> ] # registries other than crates.io
147
150
index = " …" # URL of the registry index
148
151
token = " …" # authentication token for the registry
@@ -972,6 +975,28 @@ See [rpath](profiles.md#rpath).
972
975
973
976
See [ strip] ( profiles.md#strip ) .
974
977
978
+ ## ` [resolver] `
979
+
980
+ The ` [resolver] ` table overrides [ dependency resolution behavior] ( resolver.md ) for local development (e.g. excludes ` cargo install ` ).
981
+
982
+ #### ` resolver.incompatible-rust-versions `
983
+ * Type: string
984
+ * Default: ` "allow" `
985
+ * Environment: ` CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS `
986
+
987
+ When resolving which version of a dependency to use, select how versions with incompatible ` package.rust-version ` s are treated.
988
+ Values include:
989
+ - ` allow ` : treat ` rust-version ` -incompatible versions like any other version
990
+ - ` fallback ` : only consider ` rust-version ` -incompatible versions if no other version matched
991
+
992
+ Can be overridden with
993
+ - ` --ignore-rust-version ` CLI option
994
+ - Setting the dependency's version requirement higher than any version with a compatible ` rust-version `
995
+ - Specifying the version to ` cargo update ` with ` --precise `
996
+
997
+ > ** MSRV:**
998
+ > - ` allow ` is supported on any version
999
+ > - ` fallback ` is respected as of 1.83
975
1000
976
1001
### ` [registries] `
977
1002
Original file line number Diff line number Diff line change @@ -343,31 +343,7 @@ This was stabilized in 1.79 in [#13608](https://github.com/rust-lang/cargo/pull/
343
343
344
344
### MSRV-aware resolver
345
345
346
- ` -Zmsrv-policy ` allows access to an MSRV-aware resolver which can be enabled with:
347
- - ` resolver.incompatible-rust-versions ` config field
348
- - ` workspace.resolver = "3" ` / ` package.resolver = "3" `
349
- - ` package.edition = "2024" ` (only in workspace root)
350
-
351
- The resolver will prefer dependencies with a ` package.rust-version ` that is the same or older than your project's MSRV.
352
- As the resolver is unable to determine which workspace members will eventually
353
- depend on a package when it is being selected, we prioritize versions based on
354
- how many workspace member MSRVs they are compatible with.
355
- If there is no MSRV set then your toolchain version will be used, allowing it to pick up the toolchain version from pinned in rustup (e.g. ` rust-toolchain.toml ` ).
356
-
357
- #### ` resolver.incompatible-rust-versions `
358
- * Type: string
359
- * Default: ` "allow" `
360
- * Environment: ` CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS `
361
-
362
- When resolving a version for a dependency, select how versions with incompatible ` package.rust-version ` s are treated.
363
- Values include:
364
- - ` allow ` : treat ` rust-version ` -incompatible versions like any other version
365
- - ` fallback ` : only consider ` rust-version ` -incompatible versions if no other version matched
366
-
367
- Can be overridden with
368
- - ` --ignore-rust-version ` CLI option
369
- - Setting the dependency's version requirement higher than any version with a compatible ` rust-version `
370
- - Specifying the version to ` cargo update ` with ` --precise `
346
+ This was stabilized in 1.83 in #.
371
347
372
348
### Convert ` incompatible_toolchain ` error into a lint
373
349
You can’t perform that action at this time.
0 commit comments