uncommon_codepoints
is only checked post-NFC
#120697
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-Unicode
Area: Unicode
C-bug
Category: This is a bug.
L-uncommon_codepoints
Lint: uncommon_codepoints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
(compiles successfully)
Desired output
Rationale and extra context
The
·
in the above code snippet is U+0387 GREEK ANO TELEIA, which has anIdentifier_Status
ofRestricted
and should therefore trigger theuncommon_codepoints
lint. However, U+0387 has an NFC decomposition to U+00B7 ( · ) MIDDLE DOT, which has anIdentifier_Status
ofAllowed
, and is therefore not flagged by the lint. Because the compiler applies NFC normalization to identifiers before checkinguncommon_codepoints
, the lint incorrectly fails to fire in this case.Rust Version
@rustbot label A-unicode
The text was updated successfully, but these errors were encountered: