@@ -57,6 +57,11 @@ be used as the names of:
5757> KW_WHERE : ` where ` \
5858> KW_WHILE : ` while `
5959
60+ The following keywords were added beginning in the 2018 edition.
61+
62+ > ** <sup >Lexer 2018+</sup >** \
63+ > KW_DYN : ` dyn `
64+
6065## Reserved keywords
6166
6267These keywords aren't used yet, but they are reserved for future use. They have
@@ -78,6 +83,13 @@ them to use these keywords.
7883> KW_VIRTUAL : ` virtual ` \
7984> KW_YIELD : ` yield `
8085
86+ The following keywords are reserved beginning in the 2018 edition.
87+
88+ > ** <sup >Lexer 2018+</sup >** \
89+ > KW_ASYNC : ` async ` \
90+ > KW_AWAIT : ` await ` \
91+ > KW_TRY : ` try `
92+
8193## Weak keywords
8294
8395These keywords have special meaning only in certain contexts. For example, it
@@ -92,12 +104,16 @@ is possible to declare a variable or method with the name `union`.
92104 // error[E0262]: invalid lifetime parameter name: `'static`
93105 fn invalid_lifetime_parameter<'static>(s: &'static str) -> &'static str { s }
94106 ```
95- * ` dyn ` denotes a [ trait object ] and is a keyword when used in a type position
107+ * In the 2015 edition, [ ` dyn ` ] is a keyword when used in a type position
96108 followed by a path that does not start with ` :: ` .
97109
110+ Beginning in the 2018 edition, ` dyn ` has been promoted to a strict keyword.
111+
98112> ** <sup >Lexer</sup >** \
99113> KW_UNION : ` union ` \
100- > KW_STATICLIFETIME : ` 'static ` \
114+ > KW_STATICLIFETIME : ` 'static `
115+ >
116+ > ** <sup >Lexer 2015</sup >** \
101117> KW_DYN : ` dyn `
102118
103119[ items ] : items.html
@@ -110,4 +126,4 @@ is possible to declare a variable or method with the name `union`.
110126[ Crates ] : crates-and-source-files.html
111127[ union ] : items/unions.html
112128[ variants ] : items/enumerations.html
113- [ trait object ] : types.html#trait-objects
129+ [ `dyn` ] : types.html#trait-objects
0 commit comments