Skip to content

Commit 02fece9

Browse files
committed
Add more on migrations
1 parent b3ddaf4 commit 02fece9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rust-2021/reserving-syntax.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
syntax, and no longer tokenize.
77
- This is mostly relevant to macros. E.g. `quote!{ #a#b }` is no longer accepted.
88
- It doesn't treat keywords specially, so e.g. `match"..." {}` is no longer accepted.
9-
- Insert whitespace to avoid errors.
9+
- Insert whitespace between the identifier and the subsequent `#`, `"`, or `'`
10+
to avoid errors.
11+
- Edition migrations will help you insert whitespace in such cases.
1012

1113
## Details
1214

@@ -25,7 +27,7 @@ Without an edition, this would be a breaking change, since macros can currently
2527
accept syntax such as `hello"world"`, which they will see as two separate
2628
tokens: `hello` and `"world"`. The (automatic) fix is simple though: just
2729
insert a space: `hello "world"`. Likewise, `prefix#ident` should become
28-
`prefix #ident`.
30+
`prefix #ident`. Edition migrations will help with this fix.
2931

3032
Other than turning these into a tokenization error,
3133
[the RFC][10] does not attach a meaning to any prefix yet.

0 commit comments

Comments
 (0)