Skip to content

Cargo should tell build.rs what the Rust edition is #6408

Open
@vandenoever

Description

@vandenoever

Describe the problem you are trying to solve
Syntax between Rust 2015 and Rust 2018 is different. Generating code in build.rs should know what edition of Rust to generate code for.
The code could parse Cargo.toml to figure this out, but it's cumbersome.

Describe the solution you'd like
An environment variable e.g. RUST_EDITION=2018 would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-scriptsArea: build.rs scriptsA-editionsArea: edition-specific issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions