Skip to content

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

Closed
@djc

Description

@djc
Contributor

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.

Activity

added
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
on Apr 5, 2020
added
C-tracking-issueCategory: A tracking issue for something unstable.
A-rust-versionArea: rust-version in Cargo.toml
and removed
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
on Apr 6, 2020
djc

djc commented on Jul 21, 2021

@djc
ContributorAuthor

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

ehuss commented on Jul 22, 2021

@ehuss
Contributor

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

djc commented on Jul 27, 2021

@djc
ContributorAuthor

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.
added a commit that references this issue on Aug 2, 2021

Auto merge of #9732 - djc:rust-version-docs, r=ehuss

ehuss

ehuss commented on Aug 3, 2021

@ehuss
Contributor

Closing as this has been stabilized in #9732.

djc

djc commented on Aug 5, 2021

@djc
ContributorAuthor

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

moved this to Done in Cargo Roadmapon Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rust-versionArea: rust-version in Cargo.tomlC-tracking-issueCategory: A tracking issue for something unstable.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ehuss@djc@est31

        Issue actions

          Tracking issue for minimum supported Rust version (RFC 2495) · Issue #8072 · rust-lang/cargo