Skip to content

Commit 85031eb

Browse files
committed
State in the UAX31 profile description that a lone _ is not an identifier
This is already what the Lexer rules block says.
1 parent 6bc87e2 commit 85031eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/identifiers.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The profile used from UAX #31 is:
2727
* Continue := [`XID_Continue`]
2828
* Medial := empty
2929

30+
with the additional constraint that a single underscore character is not an identifier.
31+
3032
> **Note**: Identifiers starting with an underscore are typically used to indicate an identifier that is intentionally unused, and will silence the unused warning in `rustc`.
3133
3234
Identifiers may not be a [strict] or [reserved] keyword without the `r#` prefix described below in [raw identifiers](#raw-identifiers).

0 commit comments

Comments
 (0)