Skip to content

Commit

Permalink
Document per-target edition & give an example
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Jul 31, 2018
1 parent a570dc5 commit 5fcf30f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,21 @@ 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"]

[package]
...
edition = "2018"

[[bin]]
...
edition = "2015"
```


Expand Down

0 comments on commit 5fcf30f

Please sign in to comment.