-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing error message in the presence of unicode combining characters #100388
Comments
I think the current output is already helpful enough to point out the issue. |
That said, it could be useful to print a help message for any Bidi_Class=Nonspacing_Mark characters (as an approximation for characters that could be difficult to spot) |
Just letting the user know that there might be "invisible" characters would help. |
Agree. |
@CAD97 I found there is a crate: https://github.com/swgillespie/unicode-categories Maybe give a help message for Update: we also have a function in UI rust/src/test/ui/issues/issue-29227.rs Line 15 in b998821
|
The function in test/ui is part of a minimized repro of #29227, so not relevant. I just picked Nonspacing_Mark as a likely candidate for a property to check, not because the compiler already has access to it. You'll need to use the unicode table generator to generate a table of the characters with General Category=Nonspacing Mark and/or Bidi_Class=Nonspacing_Mark for which to warn on. Adding the table to rustc is probably fine, adding it to std is nondesirable. |
Given the following code:
Playground link
The current output is:
Ideally the output should look like:
The text was updated successfully, but these errors were encountered: