You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since it seems like it's going to be implemented in rustc directly, I'm going to go ahead and close this issue.
The tracking issue linked above is still relevant. There already is a non_ascii_identifiers lint and a PR was opened to implement homoglyph detection for identifiers as well.
Homoglyphs are different unicode characters that to the naked eye look the same.
where
a
is latin lower case a, andа
is cyrillic lower case a. Another example is: A, Α, А (Latin-A, Greek Alpha, Cyrillic-A).This binary runs on my machine without errors, but it seems that the Rust playground doesn't support unicode yet.
Homoglyph-based attacks are typically used in domain names, and underhanded code.
To prevent this attacks we can check whether any two identifiers in scope are homoglyphs, and warn about it.
The text was updated successfully, but these errors were encountered: