Skip to content

Allow setting edition = "2018" in a workspace #5784

Closed

Description

@Centril

For larger projects, it could be useful to set the edition once instead of in each project's Cargo.toml file. This would then be equivalent to setting the edition key in every member project in the workspace.

Currently, the edition key is ignored instead: #5726

See also: rust-lang/edition-guide#45

Activity

  1. dwijnand commented on Jul 24, 2018

    @dwijnand
    Contributor

    Like #5661, but less granular 🙂.

    (I mention it also because one might want to tackle these in one swing.)

  2. lucksus commented on Nov 23, 2018

    @lucksus

    Especially since cargo fix --edition updates every crate in the whole workspace.

  3. pksunkara commented on Sep 4, 2020

    @pksunkara

    With the new edition coming next year, we should look into implementing this. @ehuss Are there any blockers for this?

  4. ehuss commented on Sep 5, 2020

    @ehuss
    Contributor

    I believe it is being implemented as part of #8664.

  5. futile commented on Aug 15, 2021

    @futile

    #9684 seems to be the relevant PR now. Also bump, since the 2021 edition is coming up, and this could be relevant for migration.

  6. epage commented on Apr 20, 2022

    @epage
    Contributor

    Would #8415 be a viable solution for this?

    You would set workspace.edition = "2018" and then in each crate you say package.edition.workspace = true.

  7. ehuss commented on Apr 20, 2022

    @ehuss
    Contributor

    Yea, I think RFC 2906 is the solution to this. There was a lot of discussion in RFC 2906 about whether or not workspace fields should be implicitly inherited, and it was decided that it is best to not make anything implicit, edition in particular. It looks like the edition field is already supported, so closing in favor of #8415.

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-editionsArea: edition-specific issuesA-workspacesArea: workspaces

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions