This nonsense is even explained in the book
So you used one of the Unicode confusables? There are capital letters that look like the number 3.
# 3 Ʒ Ȝ Ꝫ З Ӡ Յ Ⳍ 𝟑 𝟛 𝟥 𝟯 𝟹
( 3 ) 0033 DIGIT THREE
← ( Ʒ ) 01B7 LATIN CAPITAL LETTER EZH
← ( Ȝ ) 021C LATIN CAPITAL LETTER YOGH # →Ʒ→
← ( Ꝫ ) A76A LATIN CAPITAL LETTER ET
← ( З ) 0417 CYRILLIC CAPITAL LETTER ZE
← ( Ӡ ) 04E0 CYRILLIC CAPITAL LETTER ABKHASIAN DZE # →Ʒ→
← ( Յ ) 0545 ARMENIAN CAPITAL LETTER YI
← ( Ⳍ ) 2CCC COPTIC CAPITAL LETTER OLD COPTIC HORI # →Ȝ→→Ʒ→
← ( 𝟑 ) 1D7D1 MATHEMATICAL BOLD DIGIT THREE
← ( 𝟛 ) 1D7DB MATHEMATICAL DOUBLE-STRUCK DIGIT THREE
← ( 𝟥 ) 1D7E5 MATHEMATICAL SANS-SERIF DIGIT THREE
← ( 𝟯 ) 1D7EF MATHEMATICAL SANS-SERIF BOLD DIGIT THREE
← ( 𝟹 ) 1D7F9 MATHEMATICAL MONOSPACE DIGIT THREE
the one from the chapter 8.2
You mean З? That is Cyrillic Capital Letter Ze according to unicode. In other words it genuinely is a letter, not a number and thus lowercasing it makes sense.
If you were trying to say the help text was nonsense, it was not, because it is suggesting two lowercase letters зз versus your two uppercase letters ЗЗ. In case you thought they were the same, it's easier to see the difference between the letters when they are immediately adjacent:[1] ЗзЗзЗзЗ.
(Or maybe you just find non-ascii identifiers silly.)
as presented with the fonts in my browser etc etc, anyway ↩︎
The thing I called nonsense was the code/situation itself, the compiler is actually just doing its work
That chapter discusses handling Unicode in strings, not in identifiers. Although it does use the same character in some of the examples. I'm confused though, what's nonsense about the code/situation? Yes, naming a variable ЗЗ is a silly thing to do, but no sillier than let u8 = 10u32, which is also valid. You can name things all sorts of silly ways.
The compiler does warn about the characters too: playground
warning: the usage of Script Group `Cyrillic` in this crate consists solely of mixed script confusables
--> src/main.rs:2:9
|
2 | let ЗЗ = 32;
| ^^
|
= note: the usage includes 'З' (U+0417)
= note: please recheck to make sure their usages are indeed what you want
= note: `#[warn(mixed_script_confusables)]` on by default
