From f42831b356999ea5b4bac513017c0910fbf5e65c Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Sep 2024 15:07:30 -0500 Subject: [PATCH 1/4] docs(ref): Remove duplicate MSRV comment about MSRV Previousl, we've added a -note to each item in a consistent style. --- src/doc/src/reference/manifest.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 0fcf02b4276..f98a561ad6c 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -167,9 +167,6 @@ Rust language and compiler your package can be compiled with. If the currently selected version of the Rust compiler is older than the stated version, cargo will exit with an error, telling the user what version is required. -The first version of Cargo that supports this field was released with Rust 1.56.0. -In older releases, the field will be ignored, and Cargo will display a warning. - ```toml [package] # ... From fe70046eddbcdaa9a01db7a4f18e29db2dcc5331 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Sep 2024 15:18:35 -0500 Subject: [PATCH 2/4] docs(ref): Remove reference to interplay of rust-version/edition Ideally, we have rust-version checks on more fields and we shouldn't have to specify every variant of this. By removing this, it gives us more breathing room to expand the text more generally. --- src/doc/src/reference/manifest.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index f98a561ad6c..368c9848a16 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -176,8 +176,6 @@ rust-version = "1.56" The Rust version must be a bare version number with two or three components; it cannot include semver operators or pre-release identifiers. Compiler pre-release identifiers such as -nightly will be ignored while checking the Rust version. -The `rust-version` must be equal to or newer than the version that first -introduced the configured `edition`. The `rust-version` may be ignored using the `--ignore-rust-version` option. From f51524c0b7b822d2555e4d03018e79c740d2a844 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Sep 2024 15:27:28 -0500 Subject: [PATCH 3/4] docs(ref): Fix mistake on how many fields a rust-version must include --- src/doc/src/reference/manifest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 368c9848a16..02d5de89e72 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -173,7 +173,7 @@ will exit with an error, telling the user what version is required. rust-version = "1.56" ``` -The Rust version must be a bare version number with two or three components; it +The Rust version must be a bare version number with at least one component; it cannot include semver operators or pre-release identifiers. Compiler pre-release identifiers such as -nightly will be ignored while checking the Rust version. From d74f02e642e8230b098dad1c27bdbd2131546f04 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 24 Sep 2024 15:22:11 -0500 Subject: [PATCH 4/4] docs(ref): Group all functional comments --- src/doc/src/reference/manifest.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 02d5de89e72..ef4b7f68d70 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -163,9 +163,14 @@ will have `edition` explicitly specified to a newer value. ### The `rust-version` field The `rust-version` field is an optional key that tells cargo what version of the -Rust language and compiler your package can be compiled with. If the currently -selected version of the Rust compiler is older than the stated version, cargo -will exit with an error, telling the user what version is required. +Rust language and compiler your package can be compiled with. +If the currently selected version of the Rust compiler is older than the stated +version, cargo will exit with an error, telling the user what version is +required. +This affects all targets/crates in the package, including test suites, +benchmarks, binaries, examples, etc. + +The `rust-version` may be ignored using the `--ignore-rust-version` option. ```toml [package] @@ -177,11 +182,6 @@ The Rust version must be a bare version number with at least one component; it cannot include semver operators or pre-release identifiers. Compiler pre-release identifiers such as -nightly will be ignored while checking the Rust version. -The `rust-version` may be ignored using the `--ignore-rust-version` option. - -Setting the `rust-version` key in `[package]` will affect all targets/crates in -the package, including test suites, benchmarks, binaries, examples, etc. - To find the minimum `rust-version` compatible with your project, you can use third-party tools like [`cargo-msrv`](https://crates.io/crates/cargo-msrv). When used on packages that get published, we recommend [verifying the `rust-version`](../guide/continuous-integration.md#verifying-rust-version).