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
<!-- When updating the version, update the UAX links, too. -->
@@ -37,8 +35,6 @@ The profile used from UAX #31 is:
37
35
* Continue := [`XID_Continue`]
38
36
* Medial := empty
39
37
40
-
with the additional constraint that a single underscore character is not an identifier.
41
-
42
38
> [!NOTE]
43
39
> Identifiers starting with an underscore are typically used to indicate an identifier that is intentionally unused, and will silence the unused warning in `rustc`.
44
40
@@ -76,7 +72,7 @@ Unlike a normal identifier, a raw identifier may be any strict or reserved
76
72
keyword except the ones listed above for `RAW_IDENTIFIER`.
77
73
78
74
r[ident.raw.reserved]
79
-
It is an error to use the [RESERVED_RAW_IDENTIFIER] token`r#_` in order to avoid confusion with the [WildcardPattern].
75
+
It is an error to use the [RESERVED_RAW_IDENTIFIER] token.
Some lexical forms known as _reserved prefixes_ are reserved for future use.
964
961
965
962
r[lex.token.reserved-prefix.id]
966
-
Source input which would otherwise be lexically interpreted as a non-raw identifier (or a keyword or `_`) which is immediately followed by a `#`, `'`, or `"` character (without intervening whitespace) is identified as a reserved prefix.
963
+
Source input which would otherwise be lexically interpreted as a non-raw identifier (or a keyword) which is immediately followed by a `#`, `'`, or `"` character (without intervening whitespace) is identified as a reserved prefix.
967
964
968
965
r[lex.token.reserved-prefix.raw-token]
969
966
Note that raw identifiers, raw string literals, and raw byte string literals may contain a `#` character but are not interpreted as containing a reserved prefix.
Similarly the `r`, `b`, `br`, `c`, and `cr` prefixes used in raw string literals, byte literals, byte string literals, raw byte string literals, C string literals, and raw C string literals are not interpreted as reserved prefixes.
973
970
974
971
r[lex.token.reserved-prefix.life]
975
-
Source input which would otherwise be lexically interpreted as a non-raw lifetime (or a keyword or `_`) which is immediately followed by a `#` character (without intervening whitespace) is identified as a reserved lifetime prefix.
972
+
Source input which would otherwise be lexically interpreted as a non-raw lifetime (or a keyword) which is immediately followed by a `#` character (without intervening whitespace) is identified as a reserved lifetime prefix.
0 commit comments