Guidance for dealing with mixed_script_confusables lint

In Frunk, we wanted to test that a derive macro works on unicode identifiers. However, if you try the obvious thing, you're likely to run afowl of the mixed_script_confusables lint:

warning: The usage of Script Group `Greek` in this crate consists solely of mixed script confusables
   --> tests/
433 |         α: i32,
    |         ^
    = note: `#[warn(mixed_script_confusables)]` on by default
    = note: The usage includes 'α' (U+03B1).
    = note: Please recheck to make sure their usages are indeed what you want.

I tried replacing it with other greek letters and letters with accents, to little avail; there are A LOT of confusable characters. Eventually lloydmeta discovered that the hiragana あ satisfies the lint.

...but even then, the trouble is, the definition of a confusable character can change over time. This creates a cause for concern: It seems that the only way to reliably test unicode identifiers without triggering the lint is to put #![allow(mixed_script_confusables)] at the top of any test file that uses them.

Is there any other alternative? Some character that we can trust will never become "confusable"?

I would ignore that lint in this case. Since you're explicitly testing unicode identifiers.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.