Skip to content

Commit bf90471

Browse files
committed
fixes from feedback
1 parent 8db50d0 commit bf90471

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

src/editions/transitioning.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,44 @@ You can get `rustfix` from crates.io. Given that you're probably using Cargo,
2121
you'll want to run this:
2222

2323
```shell
24-
$ cargo +nightly install cargo-fix --git https://github.com/killercup/rustfix.git
24+
$ cargo install cargo-fix --git https://github.com/rust-lang-nursery/rustfix
2525
```
2626

27-
And that's it! Note that you do need a nightly Cargo to use `rustfix` at the
28-
moment; in fact, all of the edition stuff is nightly only for now. Eventually
29-
this will be stable! Same with installing from `git`, for now, it's needed.
27+
And that's it!
3028

3129
## Prepare for the next edition
3230

31+
Before we talk about how to move to the new edition, a reminder:
32+
33+
34+
* New editions may have features that are only available in the new edition.
35+
For example, `async`/`await` is available in Rust 2018, but not Rust 2015.
36+
* It's our intention that the migration to new editions is as smooth an experience
37+
as possible. It's considered a bug if it's difficult to upgrade your crate to
38+
a new edition. If you have a difficult time then a bug should be filed
39+
with either rustfix or Rust itself.
40+
41+
With that out of the way, let's get into it!
42+
43+
### The preview period
44+
45+
First, editions have a "preview" phase. This lets you try out the new edition
46+
in nightly Rust. During the preview, there's an extra step you need to take
47+
to opt in. At the time of writing, Rust 2018 is in its preview phase.
48+
49+
To do that, add this feature flag to your `lib.rs` or `main.rs`:
50+
51+
```rust
52+
#![feature(rust_2018_preview)]
53+
```
54+
55+
This will ensure that you're enabling all of the relevant features.
56+
57+
### Running rustfix
58+
3359
There are some lints that can help you prepare for the next edition, but
34-
they're not currently turned on by default. `rustfix` has your back
35-
though! To turn them on and have `rustfix` fix up your code, run this:
60+
they're not currently turned on by default. `rustfix` has your back though!
61+
To turn them on and have `rustfix` fix up your code, run this:
3662

3763
```shell
3864
$ cargo +nightly fix --prepare-for 2018

0 commit comments

Comments
 (0)