]> git.proxmox.com Git - cargo.git/commitdiff
Document per-target edition & give an example
authorDale Wijnand <dale.wijnand@gmail.com>
Tue, 31 Jul 2018 09:47:35 +0000 (10:47 +0100)
committerDale Wijnand <dale.wijnand@gmail.com>
Tue, 31 Jul 2018 09:47:35 +0000 (10:47 +0100)
src/doc/src/reference/unstable.md

index fe137b842011473a4f02da2b9ebb70903aa5cb9d..93ce3c58188aa292e1a6de15baadf6c7424195fb 100644 (file)
@@ -187,7 +187,10 @@ cargo +nightly build --out-dir=out -Z unstable-options
 
 You can opt in to a specific Rust Edition for your package with the `edition`
 key in `Cargo.toml`.  If you don't specify the edition, it will default to
-2015.  You need to include the appropriate `cargo-features`:
+2015.  You need to include the appropriate `cargo-features`.
+
+You can also specify `edition` on a per-target level, where it will otherwise
+default to the package `edition`.
 
 ```toml
 cargo-features = ["edition"]
@@ -195,6 +198,10 @@ cargo-features = ["edition"]
 [package]
 ...
 edition = "2018"
+
+[[bin]]
+...
+edition = "2015"
 ```