Skip to content

Commit c801dbe

Browse files
nikomatsakisehuss
andauthored
Apply suggestions from code review
Co-authored-by: Eric Huss <[email protected]>
1 parent 170c48c commit c801dbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

text/0000-edition-2021.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Any RFC or other proposal that will cause code that used to compile on edition `
133133

134134
### Determining the current edition
135135

136-
Altough there is an "ambient" edition for the crate that is specified as part of `Cargo.toml`, individual bits of code can be tied to earlier editions due to the interactions of macros. For example, if a Rust 2021 crate invokes a macro from a Rust 2018 crate, the body of that macro may be interpreted using Rust 2018 rules. For this reason, whenever an edition change is proposed, it's important to specify the tokens from which the edition is determined.
136+
Although there is an "ambient" edition for the crate that is specified as part of `Cargo.toml`, individual bits of code can be tied to earlier editions due to the interactions of macros. For example, if a Rust 2021 crate invokes a macro from a Rust 2018 crate, the body of that macro may be interpreted using Rust 2018 rules. For this reason, whenever an edition change is proposed, it's important to specify the tokens from which the edition is determined.
137137

138138
As an example, if we are introducing a new keyword, then the edition will be taken from the keyword itself. If we were to make a change to the semantics of the `+` operator, we might say that the current edition is determined from the `+` token. This way, if a macro author were to write `$a + $b`, then this expression would use the edition rules from the macro definition (which contained the `+` token). Additions that defined in the `$a` expression would use the edition from which `$a` was derived.
139139

@@ -156,9 +156,9 @@ More details on these questions follow.
156156

157157
The RFC should list **all** known code patterns that are affected by the change in edition, either because they no longer compile or because their meaning changes. This should include unusual breakage that is not expected in practice.
158158

159-
Answering this question is not a commitment to automatically migrate every instance of these code atterns, but it is important for this research to be done during the design phase such that it can be considered when evaluating migration strategies.
159+
Answering this question is not a commitment to automatically migrate every instance of these code patterns, but it is important for this research to be done during the design phase such that it can be considered when evaluating migration strategies.
160160

161-
Listing these code patterns allows us to make sure the migration is premised on the full set of breakages. This help avoid confusion where people don't recognize what code may be affected.
161+
Listing these code patterns allows us to make sure the migration is premised on the full set of breakages. This helps avoid confusion where people don't recognize what code may be affected.
162162

163163
#### Which code patterns will you migrate from the old to the new edition?
164164

0 commit comments

Comments
 (0)