-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-editionsArea: edition-specific issuesArea: edition-specific issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: 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 reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review
Description
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.
stepancheg and nyurik
Metadata
Metadata
Assignees
Labels
A-build-scriptsArea: build.rs scriptsArea: build.rs scriptsA-editionsArea: edition-specific issuesArea: edition-specific issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: 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 reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or review