Skip to content

package.edition gives confusing error when integer passed instead of string #11132

Closed
@clarfonthey

Description

@clarfonthey

Problem

With the following in Cargo.toml: package.edition = 2021

You get the below error:

error: failed to parse manifest at `<dir>/Cargo.toml`

Caused by:
  data did not match any variant of untagged enum MaybeWorkspace for key `package.edition`

Ideally, this would point out to the user that only strings are allowed, not integers, since the current edition markers are all integer years.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions