Skip to content

Commit 963339e

Browse files
committed
Fix dyn edition presentation
Per our style, edition differences are supposed to be separated out into an edition block.
1 parent 556df6b commit 963339e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/keywords.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,18 @@ r[lex.keywords.weak.lifetime-static]
131131
fn invalid_lifetime_parameter<'static>(s: &'static str) -> &'static str { s }
132132
```
133133

134-
r[lex.keywords.weak.dyn]
135-
* In the 2015 edition, [`dyn`] is a keyword when used in a type position
136-
followed by a path that does not start with `::` or `<`, a lifetime, a question mark, a `for`
137-
keyword or an opening parenthesis.
138-
139-
Beginning in the 2018 edition, `dyn` has been promoted to a strict keyword.
140-
141134
r[lex.keywords.weak.safe]
142135
* `safe` is used for functions and statics, which has meaning in [external blocks].
143136

144137
r[lex.keywords.weak.raw]
145138
* `raw` is used for [raw borrow operators], and is only a keyword when matching a raw borrow operator form (such as `&raw const expr` or `&raw mut expr`).
146139

140+
r[lex.keywords.weak.dyn.edition2018]
141+
> [!EDITION-2018]
142+
> In the 2015 edition, [`dyn`] is a keyword when used in a type position followed by a path that does not start with `::` or `<`, a lifetime, a question mark, a `for` keyword or an opening parenthesis.
143+
>
144+
> Beginning in the 2018 edition, `dyn` has been promoted to a strict keyword.
145+
147146
[items]: items.md
148147
[Variables]: variables.md
149148
[Type parameters]: types/parameters.md

0 commit comments

Comments
 (0)