-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Description
Rust reference says:
An identifier is any nonempty Unicode2 string of the following form:
- The first character has property XID_start
- The remaining characters have property XID_continue
The problem with this is that _ (LOW LINE) is not XID_start (reference: http://www.unicode.org/Public/UCD/latest/ucd/DerivedCoreProperties.txt), but _ignored is a valid Rust identifier. Rust lexer explicitly tests for the _ https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/lexer/mod.rs#L1399.
I guess the correct wording would be (keeping in mind that _ by itself is not a valid identifier):
EIther
* The first character has property XID_start
* The remaining characters have property XID_continue
Or
* The first character is _
* The second character has property XID_continue
* The remaining characters have property XID_continue
Metadata
Metadata
Assignees
Labels
No labels