Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for minimum supported Rust version (RFC 2495) #8072

Closed
djc opened this issue Apr 5, 2020 · 6 comments
Closed

Tracking issue for minimum supported Rust version (RFC 2495) #8072

djc opened this issue Apr 5, 2020 · 6 comments
Labels
A-rust-version Area: rust-version in Cargo.toml C-tracking-issue Category: A tracking issue for something unstable.

Comments

@djc
Copy link
Contributor

djc commented Apr 5, 2020

RFC: https://github.com/rust-lang/rfcs/blob/master/text/2495-min-rust-version.md
Rust tracking issue: rust-lang/rust#65262
Initial implementation: #8037
Documentation: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field

Concise description of the implementation:

  • An optional rust-version field in the Cargo.toml package section, which can contain a version number like "1.43.1" or "1.56". It must be a single version number, with no semver operator(s) or pre-release identifier. The version must be equal to or newer than the version that first introduces support for the configured edition.
  • If specified, Cargo versions newer than the one stabilizing this feature will start to fail any compile-like commands with an error referring to the specified rust-version if the crate is compiled with an older version of the compiler. Pre-release identifiers for the active compilers are ignored for purposed of comparison.
  • The rust-version field may be ignored using the --ignore-rust-version option.
@djc djc added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Apr 5, 2020
@ehuss ehuss added C-tracking-issue Category: A tracking issue for something unstable. A-rust-version Area: rust-version in Cargo.toml and removed C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Apr 6, 2020
@djc
Copy link
Contributor Author

djc commented Jul 21, 2021

My call for testing in https://users.rust-lang.org/t/call-for-testing-unstable-cargo-support-for-rust-version/59386/4 has not yielded any explicit feedback (other than likes on the post). What should we do next? Would be nice to have this stabilized (the edition coming up is also one reason why this might start being more useful).

@ehuss
Copy link
Contributor

ehuss commented Jul 22, 2021

I think stabilizing would be fine. Just need to submit a PR, updating the documentation, and write a clear description of what is being stabilized.

@djc
Copy link
Contributor Author

djc commented Jul 27, 2021

What is being stabilized:

  • An optional rust-version field in the Cargo.toml package section, which can contain a version number like "1.43.1" or "1.56". It must be a single version number, with no semver operator(s) or pre-release identifier. The version must be equal to or newer than the version that first introduces support for the configured edition.
  • If specified, Cargo versions newer than the one stabilizing this feature will start to fail any compile-like commands with an error referring to the specified rust-version if the crate is compiled with an older version of the compiler. Pre-release identifiers for the active compilers are ignored for purposed of comparison.
  • The rust-version field may be ignored using the --ignore-rust-version option.

bors added a commit that referenced this issue Aug 2, 2021
Stabilize the rust-version field

I've tried to make the documentation here fairly comprehensive. I've also updated the first version for the 2021 edition, which should now be stable pending substantial unforeseen changes.

See #8072.
@ehuss
Copy link
Contributor

ehuss commented Aug 3, 2021

Closing as this has been stabilized in #9732.

@ehuss ehuss closed this as completed Aug 3, 2021
@djc
Copy link
Contributor Author

djc commented Aug 5, 2021

Shouldn't cargo tracking issue FCPs get tracked in This Week in Rust?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust-version Area: rust-version in Cargo.toml C-tracking-issue Category: A tracking issue for something unstable.
Projects
Status: Done
Development

No branches or pull requests

3 participants