@@ -17,7 +17,7 @@ re-write your code to comply with new features and idioms.
17
17
18
18
## Installing rustfix
19
19
20
- You can get ` rustfix ` from crates.io. Given that you're probably using Cargo,
20
+ You can get ` rustfix ` from GitHub, and eventually, ` crates.io ` . Given that you're probably using Cargo,
21
21
you'll want to run this:
22
22
23
23
``` shell
@@ -31,8 +31,9 @@ And that's it!
31
31
Before we talk about how to move to the new edition, a reminder:
32
32
33
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.
34
+ * New editions might change the way you write Rust -- they add syntax,
35
+ language, and library features but also remove others. For example,
36
+ ` async ` /` await ` is available in Rust 2018, but not Rust 2015.
36
37
* It's our intention that the migration to new editions is as smooth an experience
37
38
as possible. It's considered a bug if it's difficult to upgrade your crate to
38
39
a new edition. If you have a difficult time then a bug should be filed
@@ -52,7 +53,9 @@ To do that, add this feature flag to your `lib.rs` or `main.rs`:
52
53
#![feature(rust_2018_preview)]
53
54
```
54
55
55
- This will ensure that you're enabling all of the relevant features.
56
+ This will ensure that you're enabling all of the relevant features. Note that
57
+ during the time the preview is available, we may continue to add/enable new
58
+ features with this flag!
56
59
57
60
### Running rustfix
58
61
@@ -66,8 +69,8 @@ $ cargo +nightly fix --prepare-for 2018
66
69
67
70
This would turn on those lints, and fix up the project for the 2018 edition.
68
71
If there's something that ` rustfix ` doesn't know how to fix automatically yet,
69
- the warning will be printed; you'll need to fix those manually. Do so
70
- until you get a run with no warnings.
72
+ the usual compiler warning will be printed; you'll need to fix those
73
+ manually. Do so until you get a run with no warnings.
71
74
72
75
## Commit to the next edition
73
76
@@ -85,9 +88,9 @@ That `cargo-features` line should go at the very top; and `edition` goes into
85
88
the ` [package] ` section. As mentioned above, right now this is a nightly-only
86
89
feature of Cargo, so you need to enable it for things to work.
87
90
88
- At this point, your project should compile with a regular old ` cargo build ` .
89
- However, since you've said you're using the new edition, you may get more
90
- warnings! Time to bust out ` rustfix ` again.
91
+ At this point, your project should compile with a regular old `cargo +nightly
92
+ build`. However, since you've said you're using the new edition, you may get
93
+ more warnings! Time to bust out ` rustfix ` again.
91
94
92
95
## Fix new warnings
93
96
@@ -97,4 +100,4 @@ To fix up these warnings, we can use `rustfix`:
97
100
$ cargo +nightly fix
98
101
```
99
102
100
- This will fix up all of the new warnings. Congrats! You're done!
103
+ This will try to fix up all of the new warnings. Congrats! You're done!
0 commit comments