NON_KEYWORD_IDENTIFIER | RAW_IDENTIFIER
Identifiers follow the specification in Unicode Standard Annex #31 for Unicode version 15.0, with the additions described below. Some examples of identifiers:
The profile used from UAX #31 is:
with the additional constraint that a single underscore character is not an identifier.
Note: Identifiers starting with an underscore are typically used to indicate an identifier that is intentionally unused, and will silence the unused warning in
Zero width non-joiner (ZWNJ U+200C) and zero width joiner (ZWJ U+200D) characters are not allowed in identifiers.
- External crate names referenced in a path
- Module names loaded from the filesystem without a
- Item names in external blocks
Identifiers are normalized using Normalization Form C (NFC) as defined in Unicode Standard Annex #15. Two identifiers are equal if their NFC forms are equal.
A raw identifier is like a normal identifier, but prefixed by
r#. (Note that
r# prefix is not included as part of the actual identifier.)
Unlike a normal identifier, a raw identifier may be any strict or reserved
keyword except the ones listed above for