From 8ac5b5203d2da73b147ce203027d4ffee124dd1b Mon Sep 17 00:00:00 2001 From: Kenny Huynh Date: Sun, 6 Dec 2020 14:09:21 -0800 Subject: [PATCH 1/2] Clarify cargo manifest edition field docs --- src/doc/src/reference/manifest.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index e544393aa5b..7f45b59ea44 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -118,9 +118,14 @@ brackets at the end of each author. #### 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 +`[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] @@ -128,12 +133,6 @@ default to 2015. 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 From da5b0794c7681a627522e3769a8023ecbe15664b Mon Sep 17 00:00:00 2001 From: Kenny Huynh Date: Sun, 6 Dec 2020 17:56:29 -0800 Subject: [PATCH 2/2] wordsmithing --- src/doc/src/reference/manifest.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 7f45b59ea44..89462a63bbd 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -119,8 +119,8 @@ brackets at the end of each author. #### The `edition` field 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 +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.