Skip to content

Commit 40a4d1e

Browse files
authored
docs: make it clearer that rust_version is enforced during compile (#15303)
<!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. --> ### What does this PR try to resolve? The current wording makes it sound like Cargo will only refuse to compile the package if it encounters any missing functionality in stdlib while compiling the package on an unsupported toolchain. However, cargo will actually refuse to build the package unless overridden or the toolchain is updated. ### How should we test and review this PR? No tests are required or applicable for this PR unless I am mistaken ### Additional information
2 parents 083dc92 + 51283b8 commit 40a4d1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/doc/src/reference/rust-version.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ identifiers such as -nightly will be ignored while checking the Rust version.
1919

2020
**Diagnostics:**
2121

22-
When your package is compiled on an unsupported toolchain,
23-
Cargo will provide clearer diagnostics about the insufficient toolchain version rather than reporting invalid syntax or missing functionality in the standard library.
24-
This affects all [Cargo targets](cargo-targets.md) in the package, including binaries, examples, test suites,
25-
benchmarks, etc.
22+
When your package is compiled on an unsupported toolchain, Cargo will report that as an error to the user. This makes the support expectations clear and avoids reporting a less direct diagnostic like invalid syntax or missing functionality
23+
in the standard library. This affects all [Cargo targets](cargo-targets.md) in the
24+
package, including binaries, examples, test suites, benchmarks, etc.
25+
A user can opt-in to an unsupported build of a package with the `--ignore-rust-version` flag.
26+
2627

2728
**Development aid:**
2829

0 commit comments

Comments
 (0)