Repository navigation
XID_Start / XID_Continue might not be quite right #4928
Description
Activity
Bug triage. Re-nominating to change to milestone 1, well-defined.
accepted for backwards-compatible milestone
Non-ascii identifiers are currently feature gated, so this isn't as pressing, but we still need to figure out what to do here. Re-nominating, I don't think this needs to be backcompat.
Correct, non-ascii idents are feature-gated. Recategorizing as P-low (and not 1.0).
I would really like to see Unicode superscripts allowed, as subscripts already are. I would be willing to make a pull request to implement this.
Triage: unicode identifiers are still feature gated, no changes.
- addedC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.and removedA-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
on Jul 19, 2017 XID_Start / XID_Continue has one small bug, and is not enough to get proper unicode identifiers safe. See also http://websec.github.io/unicode-security-guide/
You need to add mixed script protections (TR39 Restriction levels), normalize them (to NFC or NFKC_Casefold), and maybe disallow confusables.
A short overview is here: http://perl11.org/blog/unicode-identifiers.htmlbug: U+3164 HANGUL FILLER and U+ffa0 are wrongly specified as ID_Continue. Disallow these.
Closing in favor of #55467.
@Centril, is this specific issue actually addressed in rust-lang/rfcs#2457 or tracked in #55467? As far as I can tell they specify unmodified
XID_StartandXID_Continue.@SimonSapin at least tracked in that issue to consolidate; tho I didn't read the issue description in detail.
I’ve added this as a checkbox in Unresolved Questions in #55467
- added a commit that references this issue
on Mar 30, 2026
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1518.htm
The ISO JTC1/SC22/WG14 (C language) think that possibly UTR#31 didn't quite hit the nail on the head in terms of defining identifier syntax. They have a couple tweaks in mind. Consider following their lead.