You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: src/doc/src/reference/manifest.md
+8-13Lines changed: 8 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -164,29 +164,24 @@ will have `edition` explicitly specified to a newer value.
164
164
### The `rust-version` field
165
165
166
166
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.
170
173
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.
173
175
174
176
```toml
175
177
[package]
176
178
# ...
177
179
rust-version = "1.56"
178
180
```
179
181
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
181
183
cannot include semver operators or pre-release identifiers. Compiler pre-release
182
184
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.
190
185
191
186
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).
0 commit comments