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

Clarify cargo manifest edition field docs #8953

Merged
merged 2 commits into from
Dec 7, 2020
Merged
Changes from 1 commit
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
17 changes: 8 additions & 9 deletions src/doc/src/reference/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,21 @@ brackets at the end of each author.
<a id="the-edition-field-optional"></a>
#### The `edition` field

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.
The `edition` key is an optional key that affects which edition your package
is compiled with. Cargo will always generate packages via [`cargo new`] with
the `edition` key set to the latest edition. Setting the `edition` key in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cargo will always generate packages via [cargo new] with
the edition key set to the latest edition.

Perhaps:
[cargo new] will generate a package with the edition key set to the latest edition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I like that wording much better. see my new changes!

`[package]` will affect all targets/crates in the package, including test
suites, benchmarks, binaries, examples, etc.

If the `edition` key is not set to a specific [Rust Edition] in your
`Cargo.toml`, Cargo will default to 2015.

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

The `edition` key affects which edition your package is compiled with. Cargo
will always generate packages via [`cargo new`] 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.

#### The `description` field

The description is a short blurb about the package. [crates.io] will display
Expand Down