From bc4cabd02e15043e3dec2ad010fd59389ddb83db Mon Sep 17 00:00:00 2001 From: Matt Gaunt Date: Tue, 23 Feb 2021 19:57:03 -0800 Subject: [PATCH 1/4] Correct default cargo new edition I think this is a small typo in the docs but feel free to close this PR if I'm mistaken --- src/doc/src/reference/manifest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index e9957bd90ab..922736b14b2 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -126,7 +126,7 @@ set to the latest edition. Setting the `edition` key in 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. +`Cargo.toml`, Cargo will default to 2018. ```toml [package] From 535db2fb3252782d2817912e1cf710924b5d0df9 Mon Sep 17 00:00:00 2001 From: Matt Gaunt Date: Tue, 23 Feb 2021 20:13:24 -0800 Subject: [PATCH 2/4] Update manifest.md Suggestion for text when the edition isn't defined at all --- src/doc/src/reference/manifest.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 922736b14b2..945aff0f2d9 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -125,15 +125,14 @@ 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 2018. - ```toml [package] # ... edition = '2018' ``` +If the `edition` key is not set in your `Cargo.toml` file, Cargo will default to 2015. + #### The `description` field The description is a short blurb about the package. [crates.io] will display From 560bf5f4165bbcc34ab447e776965290ea7ae373 Mon Sep 17 00:00:00 2001 From: Matt Gaunt Date: Tue, 23 Feb 2021 20:18:12 -0800 Subject: [PATCH 3/4] Update manifest.md Another alterations after pondering further --- src/doc/src/reference/manifest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 945aff0f2d9..3e85d1e14bd 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -131,7 +131,7 @@ suites, benchmarks, binaries, examples, etc. edition = '2018' ``` -If the `edition` key is not set in your `Cargo.toml` file, Cargo will default to 2015. +If the `edition` key is not set, or the value is not a valid [Rust edition] in your `Cargo.toml`, Cargo will default to 2015. #### The `description` field From d1c28a5aa8eb264ba2b6205f663ff81c28618f1c Mon Sep 17 00:00:00 2001 From: Matt Gaunt Date: Wed, 24 Feb 2021 14:50:09 -0800 Subject: [PATCH 4/4] Update manifest.md Based on feedback, removed invalid value statement. --- 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 3e85d1e14bd..c77bbdbf565 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -119,7 +119,7 @@ brackets at the end of each author. #### The `edition` field -The `edition` key is an optional key that affects which edition your package +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 @@ -131,7 +131,7 @@ suites, benchmarks, binaries, examples, etc. edition = '2018' ``` -If the `edition` key is not set, or the value is not a valid [Rust edition] in your `Cargo.toml`, Cargo will default to 2015. +If the `edition` key is not set in your `Cargo.toml`, Cargo will default to 2015. #### The `description` field