-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
cargo new
creates a new project for the 2015 edition. If you want to use the 2018 features like not having to type extern crate foo
to be able to import foo::bar
then you have to add this to your Cargo.toml:
cargo-features = ["edition"]
[package]
edition = "2018"
# ..
Would it make sense to add an --edition
flag to cargo new
to indicate which edition the project will use? For example, cargo new --edition 2018
would create a project with a Cargo.toml that includes package.edition = "2018"
Please avoid discussing whether cargo new
should default to the 2018 edition. That's a separate issue and should be discussed separately.
dwijnand and sanmai-NL
Metadata
Metadata
Assignees
Labels
No labels