Skip to content

Commit 2d9b1b9

Browse files
authored
Merge pull request #266 from ehuss/2021-stabilization
Update for 2021 stabilization
2 parents 3710b0c + 09a02b0 commit 2d9b1b9

4 files changed

+9
-31
lines changed

src/SUMMARY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
## Rust 2021
2626

27-
- [Rust 2021 🚧](rust-2021/index.md)
27+
- [Rust 2021](rust-2021/index.md)
2828
- [Additions to the prelude](rust-2021/prelude.md)
2929
- [Default Cargo feature resolver](rust-2021/default-cargo-resolver.md)
3030
- [IntoIterator for arrays](rust-2021/IntoIterator-for-arrays.md)

src/editions/creating-a-new-project.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ configuration for the latest edition:
66
```console
77
> cargo +nightly new foo
88
Created binary (application) `foo` project
9-
> cat .\foo\Cargo.toml
9+
> cat foo/Cargo.toml
1010
[package]
1111
name = "foo"
1212
version = "0.1.0"
13-
authors = ["your name <[email protected]>"]
14-
edition = "2018"
13+
edition = "2021"
1514

1615
[dependencies]
1716
```
1817

19-
That `edition = "2018"` setting will configure your package to use Rust 2018.
18+
That `edition = "2021"` setting will configure your package to use Rust 2021.
2019
No more configuration needed!
2120

2221
If you'd prefer to use an older edition, you can change the value in that
@@ -26,7 +25,6 @@ key, for example:
2625
[package]
2726
name = "foo"
2827
version = "0.1.0"
29-
authors = ["your name <[email protected]>"]
3028
edition = "2015"
3129

3230
[dependencies]

src/editions/transitioning-an-existing-project-to-a-new-edition.md

-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ Briefly, the steps to update to the next edition are:
88
2. Edit `Cargo.toml` and set the `edition` field to the next edition, for example `edition = "2021"`
99
3. Run `cargo build` or `cargo test` to verify the fixes worked.
1010

11-
<!-- remove this when 2021 is stabilized -->
12-
> If you are migrating from 2018 to 2021, the steps are slightly different because 2021 is not yet stabilized, and is only available on the [nightly channel].
13-
> The steps to follow are:
14-
>
15-
> 1. Install the most recent nightly: `rustup update nightly`.
16-
> 2. Run `cargo +nightly fix --edition`.
17-
> 3. Edit `Cargo.toml` and place `cargo-features = ["edition2021"]` at the top (above `[package]`), and change the edition field to say `edition = "2021"`.
18-
> 4. Run `cargo +nightly check` to verify it now works in the new edition.
19-
2011
The following sections dig into the details of these steps, and some of the issues you may encounter along the way.
2112

2213
> It's our intention that the migration to new editions is as smooth an

src/rust-2021/index.md

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
# Rust 2021
22

3-
🚧 The 2021 Edition has not yet been released and hence this section is still "under construction".
4-
You can [read more about our plans in this blog post](https://blog.rust-lang.org/2021/05/11/edition-2021.html).
5-
63
| Info | |
74
| --- | --- |
85
| RFC | [#3085](https://github.com/rust-lang/rfcs/pull/3085) |
9-
| Release version | 1.56.0 (anticipated) |
10-
11-
The Rust 2021 Edition is currently slated for release in Rust 1.56.0.
12-
Rust 1.56.0 will then be in beta for six weeks,
13-
after which it is released as stable on October 21st.
14-
15-
However, note that Rust is a project run by volunteers.
16-
We prioritize the personal well-being of everyone working on Rust
17-
over any deadlines and expectations we might have set.
18-
This could mean delaying the edition a version if necessary,
19-
or dropping a feature that turns out to be too difficult or stressful to finish in time.
6+
| Release version | 1.56.0 |
207

21-
That said, we are on schedule and many of the difficult problems are already tackled,
22-
thanks to all the people contributing to Rust 2021! 💛
8+
The Rust 2021 Edition contains several changes that bring new capabilities and more consistency to the language,
9+
and opens up room for expansion in the future.
10+
The following chapters dive into the details of each change,
11+
and they include guidance on migrating your existing code.

0 commit comments

Comments
 (0)