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 these
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 @@ -350,31 +350,7 @@ This was stabilized in 1.79 in [#13608](https://github.com/rust-lang/cargo/pull/
350
350
351
351
### MSRV-aware resolver
352
352
353
- ` -Zmsrv-policy ` allows access to an MSRV-aware resolver which can be enabled with:
354
- - ` resolver.incompatible-rust-versions ` config field
355
- - ` workspace.resolver = "3" ` / ` package.resolver = "3" `
356
- - ` package.edition = "2024" ` (only in workspace root)
357
-
358
- The resolver will prefer dependencies with a ` package.rust-version ` that is the same or older than your project's MSRV.
359
- As the resolver is unable to determine which workspace members will eventually
360
- depend on a package when it is being selected, we prioritize versions based on
361
- how many workspace member MSRVs they are compatible with.
362
- 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 ` ).
363
-
364
- #### ` resolver.incompatible-rust-versions `
365
- * Type: string
366
- * Default: ` "allow" `
367
- * Environment: ` CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS `
368
-
369
- When resolving a version for a dependency, select how versions with incompatible ` package.rust-version ` s are treated.
370
- Values include:
371
- - ` allow ` : treat ` rust-version ` -incompatible versions like any other version
372
- - ` fallback ` : only consider ` rust-version ` -incompatible versions if no other version matched
373
-
374
- Can be overridden with
375
- - ` --ignore-rust-version ` CLI option
376
- - Setting the dependency's version requirement higher than any version with a compatible ` rust-version `
377
- - Specifying the version to ` cargo update ` with ` --precise `
353
+ This was stabilized in 1.83 in [ #14639 ] ( https://github.com/rust-lang/cargo/pull/14639 ) .
378
354
379
355
### Convert ` incompatible_toolchain ` error into a lint
380
356
You can’t perform that action at this time.
0 commit comments