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: src/keywords.md
+13-7
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,16 @@ The following keywords are reserved beginning in the 2024 edition.
100
100
These keywords have special meaning only in certain contexts. For example, it
101
101
is possible to declare a variable or method with the name `union`.
102
102
103
+
> **<sup>Lexer</sup>**\
104
+
> KW_MACRO_RULES : `macro_rules`\
105
+
> KW_UNION : `union`\
106
+
> KW_STATICLIFETIME : `'static`\
107
+
> KW_SAFE : `safe`\
108
+
> KW_RAW : `raw`
109
+
>
110
+
> **<sup>Lexer 2015</sup>**\
111
+
> KW_DYN : `dyn`
112
+
103
113
*`macro_rules` is used to create custom [macros].
104
114
*`union` is used to declare a [union] and is only a keyword when used in a
105
115
union declaration.
@@ -116,15 +126,10 @@ is possible to declare a variable or method with the name `union`.
116
126
117
127
Beginning in the 2018 edition, `dyn` has been promoted to a strict keyword.
118
128
119
-
> **<sup>Lexer</sup>**\
120
-
> KW_MACRO_RULES : `macro_rules`\
121
-
> KW_UNION : `union`\
122
-
> KW_STATICLIFETIME : `'static`
123
-
>
124
-
> **<sup>Lexer 2015</sup>**\
125
-
> KW_DYN : `dyn`
126
129
*`safe` is used for functions and statics, which has meaning in [external blocks].
127
130
131
+
*`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`).
132
+
128
133
[items]: items.md
129
134
[Variables]: variables.md
130
135
[Type parameters]: types/parameters.md
@@ -139,3 +144,4 @@ is possible to declare a variable or method with the name `union`.
0 commit comments