Skip to content

Commit 2fd7321

Browse files
committed
Auto merge of #14619 - epage:msrv-docs, r=weihanglo
docs(ref): Clean up language for `package.rust-version` ### What does this PR try to resolve? Some small tweaks I noticed as I was working on putting in more MSRV policy guidance. ### How should we test and review this PR? ### Additional information
2 parents dc041a0 + d74f02e commit 2fd7321

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

src/doc/src/reference/manifest.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,29 +164,24 @@ will have `edition` explicitly specified to a newer value.
164164
### The `rust-version` field
165165

166166
The `rust-version` field is an optional key that tells cargo what version of the
167-
Rust language and compiler your package can be compiled with. If the currently
168-
selected version of the Rust compiler is older than the stated version, cargo
169-
will exit with an error, telling the user what version is required.
167+
Rust language and compiler your package can be compiled with.
168+
If the currently selected version of the Rust compiler is older than the stated
169+
version, cargo will exit with an error, telling the user what version is
170+
required.
171+
This affects all targets/crates in the package, including test suites,
172+
benchmarks, binaries, examples, etc.
170173

171-
The first version of Cargo that supports this field was released with Rust 1.56.0.
172-
In older releases, the field will be ignored, and Cargo will display a warning.
174+
The `rust-version` may be ignored using the `--ignore-rust-version` option.
173175

174176
```toml
175177
[package]
176178
# ...
177179
rust-version = "1.56"
178180
```
179181

180-
The Rust version must be a bare version number with two or three components; it
182+
The Rust version must be a bare version number with at least one component; it
181183
cannot include semver operators or pre-release identifiers. Compiler pre-release
182184
identifiers such as -nightly will be ignored while checking the Rust version.
183-
The `rust-version` must be equal to or newer than the version that first
184-
introduced the configured `edition`.
185-
186-
The `rust-version` may be ignored using the `--ignore-rust-version` option.
187-
188-
Setting the `rust-version` key in `[package]` will affect all targets/crates in
189-
the package, including test suites, benchmarks, binaries, examples, etc.
190185

191186
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).
192187

0 commit comments

Comments
 (0)