Skip to content

Commit ad48d09

Browse files
committed
feat: -Zmsrv-policy groundwork
1 parent a949e5d commit ad48d09

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/cargo/core/features.rs

+2
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ unstable_cli_options!(
733733
unstable_options: bool = ("Allow the usage of unstable options"),
734734
skip_rustdoc_fingerprint: bool = (HIDDEN),
735735
rustdoc_scrape_examples: bool = ("Allows Rustdoc to scrape code examples from reverse-dependencies"),
736+
msrv_policy: bool = ("Enable rust-version aware policy within cargo"),
736737
);
737738

738739
const STABILIZED_COMPILE_PROGRESS: &str = "The progress bar is now always \
@@ -1095,6 +1096,7 @@ impl CliUnstable {
10951096
"timings" => stabilized_warn(k, "1.60", STABILIZED_TIMINGS),
10961097
"codegen-backend" => self.codegen_backend = parse_empty(k, v)?,
10971098
"profile-rustflags" => self.profile_rustflags = parse_empty(k, v)?,
1099+
"msrv-policy" => self.msrv_policy = parse_empty(k, v)?,
10981100
_ => bail!("unknown `-Z` flag specified: {}", k),
10991101
}
11001102

src/doc/src/reference/unstable.md

+9
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Each new feature described below should explain how to use it.
6969
* [minimal-versions](#minimal-versions) --- Forces the resolver to use the lowest compatible version instead of the highest.
7070
* [direct-minimal-versions](#direct-minimal-versions) — Forces the resolver to use the lowest compatible version instead of the highest.
7171
* [public-dependency](#public-dependency) --- Allows dependencies to be classified as either public or private.
72+
* [msrv-policy](#msrv-policy) --- MSRV-aware resolver and version selection
7273
* Output behavior
7374
* [out-dir](#out-dir) --- Adds a directory where artifacts are copied to.
7475
* [Different binary name](#different-binary-name) --- Assign a name to the built binary that is separate from the crate name.
@@ -300,6 +301,14 @@ my_dep = { version = "1.2.3", public = true }
300301
private_dep = "2.0.0" # Will be 'private' by default
301302
```
302303

304+
### msrv-policy
305+
- [#9930](https://github.com/rust-lang/cargo/issues/9930) (MSRV-aware resolver)
306+
- [#10653](https://github.com/rust-lang/cargo/issues/10653) (MSRV-aware cargo-add)
307+
- [#10903](https://github.com/rust-lang/cargo/issues/10903) (MSRV-aware cargo-install)
308+
309+
The `msrv-policy` feature enables experiments in MSRV-aware policy for cargo in
310+
preparation for an upcoming RFC.
311+
303312
### build-std
304313
* Tracking Repository: <https://github.com/rust-lang/wg-cargo-std-aware>
305314

0 commit comments

Comments
 (0)