Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordsmith the edition documentation a bit more #9233

Merged
merged 2 commits into from
Mar 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,24 @@ brackets at the end of each author.
#### The `edition` field

The `edition` key is an optional key that affects which [Rust Edition] your package
is compiled with. [`cargo new`] will generate a package with the `edition` key
set to the latest edition. Setting the `edition` key in
`[package]` will affect all targets/crates in the package, including test
suites, benchmarks, binaries, examples, etc.
is compiled with. Setting the `edition` key in `[package]` will affect all
targets/crates in the package, including test suites, benchmarks, binaries,
examples, etc.

```toml
[package]
# ...
edition = '2018'
```

If the `edition` key is not set in your `Cargo.toml`, Cargo will default to 2015.
Most manifests have the `edition` field filled in automatically by [`cargo new`]
with the latest stable edition. By default `cargo new` creates a manifest with
the 2018 edition currently.

If the `edition` field is not present in `Cargo.toml`, then the 2015 edition is
assumed for backwards compatibility. Note that all manifests
created with [`cargo new`] will not use this historical fallback because they
will have `edition` explicitly specified to a newer value.

#### The `description` field

Expand Down