Cargo should tell build.rs
what the Rust edition is
#6408
Labels
A-build-scripts
Area: build.rs scripts
A-editions
Area: edition-specific issues
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
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.The text was updated successfully, but these errors were encountered: