You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: text/0000-edition-2021.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
# Summary
7
7
[summary]: #summary
8
8
9
-
This RFC describes the plan for the 2021 Edition. It supercedes[RFC 2052]. The proposed 2021 Edition is intentionally more limited than the 2018 Edition. Rather than representing a major marketing push, the 2021 Edition represents a chance for us to introduce changes that would otherwise be backwards incompatible. It is meant to be marketed in many ways as something closer to "just another release".
9
+
This RFC describes the plan for the 2021 Edition. It supersedes[RFC 2052]. The proposed 2021 Edition is intentionally more limited than the 2018 Edition. Rather than representing a major marketing push, the 2021 Edition represents a chance for us to introduce changes that would otherwise be backwards incompatible. It is meant to be marketed in many ways as something closer to "just another release".
10
10
11
11
Key points include:
12
12
@@ -64,11 +64,11 @@ Our goal is to see all Rust users adopt the new edition, just as we would genera
64
64
65
65
## Rust should feel like "one language"
66
66
67
-
Editions introduce backwards incompatible changes to Rust, which in turn introduces the risk that Rust begins to feel like a language with many dialects. We want to avoid the experience that people come to a Rust project and feel unsure about what a given piece of code means or what kinds of features they can use. This is why we prefer year-based editions (e.g., Rust 2018, Rust 2021) that group together a number of changes, rather than fine-grained opt-in; year-based editions can be succintly described, and ensure that when you go to a codebase, it is relatively easy to determine what set of features is available.
67
+
Editions introduce backwards incompatible changes to Rust, which in turn introduces the risk that Rust begins to feel like a language with many dialects. We want to avoid the experience that people come to a Rust project and feel unsure about what a given piece of code means or what kinds of features they can use. This is why we prefer year-based editions (e.g., Rust 2018, Rust 2021) that group together a number of changes, rather than fine-grained opt-in; year-based editions can be succinctly described, and ensure that when you go to a codebase, it is relatively easy to determine what set of features is available.
68
68
69
69
### Uniform behavior across editions
70
70
71
-
Persuant to the goal of having Rust feel like "one language", we generally prefer uniform behavior across all editions of Rust, so long as it can be achieved without compromising other design goals. This means for example that if we add a new feature that is backwards compatible, it should be made available in all editions. Similarly, if we deprecate a pattern that we think is problematic, it should be deprecated across all editions.
71
+
Pursuant to the goal of having Rust feel like "one language", we generally prefer uniform behavior across all editions of Rust, so long as it can be achieved without compromising other design goals. This means for example that if we add a new feature that is backwards compatible, it should be made available in all editions. Similarly, if we deprecate a pattern that we think is problematic, it should be deprecated across all editions.
72
72
73
73
Having uniform behavior across editions has several benefits:
74
74
@@ -104,7 +104,7 @@ The default edition for new projects will be 2021.
104
104
105
105
## RFCs that propose edition changes
106
106
107
-
RFCs that propose migrations should include details about how the migration between editions will work. This migration should be described in sufficient detail that the relevant teams can assess the feasibility of the migration. It will often make sense to consult the compiler team on this question specificially.
107
+
RFCs that propose migrations should include details about how the migration between editions will work. This migration should be described in sufficient detail that the relevant teams can assess the feasibility of the migration. It will often make sense to consult the compiler team on this question specifically.
108
108
109
109
* To perform this evaluation, an RFC proposing a migration should enumerate the situations that will no longer compile with the change.
110
110
* For each such situation, it should describe what suggestions will be made to modify the user's code such that it works on both the old and new edition. Optionally, the description may include "idiom lints" that run only in the new edition in order to make the code more idiomatic.
@@ -173,7 +173,7 @@ The following metrics are an attempt to quantify some of the goals we have for e
173
173
* 90% of crater-seen crates migrate without manual intervention.
174
174
* This can be measured automatically, subject to the limitations of crater (e.g., linux only).
175
175
* 90% of crates that were migrated to the newer edition could be migrated in less than 1 hour
176
-
* This includes both rustfix but also manual migraton.
176
+
* This includes both rustfix but also manual migration.
177
177
* This will require a survey or other forms of self-reporting.
178
178
179
179
### Adoption
@@ -217,7 +217,7 @@ This model works well for larger, sweeping changes, such as the changes to modul
217
217
[prior-art]: #prior-art
218
218
219
219
-[RFC 2052] introduced Rust's editions.
220
-
- Ember's notion of feature-driven editions were introduced in [Ember RFC 364](https://github.com/emberjs/rfcs/blob/master/text/0364-roadmap-2018.md).
220
+
- Ember's notion of feature-driven editions was introduced in [Ember RFC 364](https://github.com/emberjs/rfcs/blob/master/text/0364-roadmap-2018.md).
221
221
- As noted in [RFC 2052], C/C++ and Java compilers both have ways of specifying which version of the standard the code is expected to conform to.
222
222
- The [XSLT programming language](https://www.w3.org/TR/xslt-30/) had explicit version information embedded in every program that was used to guide transitions. (Author's note: nikomatsakis used to work on an XSLT compiler and cannot resist citing this example. nikomatsakis also discovered that there is apparently an XSLT 3.0 now. 👀)
223
223
@@ -235,4 +235,4 @@ The lang team is expected to decide the final policy on warnings and idiom lints
0 commit comments