From 9906a6d899ee8246696929e2853d92965a203878 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sat, 28 Jul 2018 17:44:09 -0400 Subject: [PATCH 1/2] Explicitly mention not passing prepare flag after switching to new edition --- src/editions/transitioning.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/editions/transitioning.md b/src/editions/transitioning.md index 6a0973e2..b938d66d 100644 --- a/src/editions/transitioning.md +++ b/src/editions/transitioning.md @@ -91,6 +91,10 @@ build`. If it does not, this is a bug! Please [file an issue][issue]. [issue]: https://github.com/rust-lang/rust/issues/new +Now that you've switched to the new edition, you should no longer pass the +`--prepare-for 2018` flag to `cargo fix` because you are now already on +the next edition! + ## Writing idiomatic code in a new edition Your crate has now entered the 2018 edition of Rust, congrats! Recall though From 2562e7133cf31e2aff280edd4b8cecf062eb1f06 Mon Sep 17 00:00:00 2001 From: johnthagen Date: Sun, 29 Jul 2018 08:21:24 -0400 Subject: [PATCH 2/2] Move the --prepare-for explicit note to the last section --- src/editions/transitioning.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/editions/transitioning.md b/src/editions/transitioning.md index b938d66d..883a37d5 100644 --- a/src/editions/transitioning.md +++ b/src/editions/transitioning.md @@ -91,10 +91,6 @@ build`. If it does not, this is a bug! Please [file an issue][issue]. [issue]: https://github.com/rust-lang/rust/issues/new -Now that you've switched to the new edition, you should no longer pass the -`--prepare-for 2018` flag to `cargo fix` because you are now already on -the next edition! - ## Writing idiomatic code in a new edition Your crate has now entered the 2018 edition of Rust, congrats! Recall though @@ -109,7 +105,9 @@ these lints add this to your `lib.rs` or `main.rs`: #![warn(rust_2018_idioms)] ``` -and then execute: +Note that since you already switched to the new edition in the previous section, +you should no longer pass the `--prepare-for 2018` flag to `cargo fix` because +you are now already on the next edition! Execute: ```shell $ cargo +nightly fix