From 85031eb68b7418e49575efbf6e6c7fdad7f9f532 Mon Sep 17 00:00:00 2001 From: Matthew Woodcraft Date: Thu, 6 Jan 2022 21:29:45 +0000 Subject: [PATCH] State in the UAX31 profile description that a lone `_` is not an identifier This is already what the Lexer rules block says. --- src/identifiers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/identifiers.md b/src/identifiers.md index c6361c4db..a4e972cd3 100644 --- a/src/identifiers.md +++ b/src/identifiers.md @@ -27,6 +27,8 @@ The profile used from UAX #31 is: * Continue := [`XID_Continue`] * Medial := empty +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 `rustc`. Identifiers may not be a [strict] or [reserved] keyword without the `r#` prefix described below in [raw identifiers](#raw-identifiers).