Uh oh!
There was an error while loading. Please reload this page.
feat: invisible character help string - #150790
Conversation
rustbot
commented
Jan 8, 2026
rustbot has assigned @WaffleLapkin. Use |
This comment has been minimized.
This comment has been minimized.
| // way. | ||
| let (token, sugg) = | ||
| unicode_chars::check_for_substitution(self, start, c, repeats + 1); | ||
| const INVISIBLE_CHARACTERS: [char; 8] = ['\u{200B}', '\u{200C}', '\u{2060}', '\u{2061}', '\u{2062}', '\u{00AD}', '\u{034F}', '\u{061C}']; |
There was a problem hiding this comment.
Is there any place this list could be sourced from so we don't need to maintain it in this specific place? There are definitely more as well. Maybe one of the unicode- crates provides it, @Manishearth would know.
Also having a const in the middle of a block is rather unidiomatic, if kept it should be moved to the top of the file.
There was a problem hiding this comment.
I found a list of invisible characters here: https://www.editpad.org/tool/invisible-character. I only took ones that didn't actually take up a space.
I can move the const to the top of the file as well if that's more idiomatic.
lukaslueg
commented
Jan 8, 2026
Bryntet
commented
Jan 8, 2026
this clippy lint only does this on string literals though from what I can tell |
11d0da1 to
a6212c5CompareKivooeo
commented
Jan 9, 2026
Could you please squash the commits? |
tgross35
commented
Jan 9, 2026
^ and drop the emojis pls, we know what a feature is even without the ✨ :) |
GenericNerd
commented
Jan 10, 2026
Is there any specific guidelines for commit messages? I was made semi-aware of squashing commits but was not made aware of how commits are meant to be formatted. I used the conventional commits extension in VSC so I'm just trying to make sure I only have to do this once! |
tgross35
commented
Jan 10, 2026
Nothing too specific :) "conventional" prefixes like Gitmoji is just pretty superfluous and doesn't match anything in the log, so we ask to avoid emojis in summaries. |
a6212c5 to
2b597f5CompareGenericNerd
commented
Jan 10, 2026
@rustbot ready |
tgross35
commented
Jan 11, 2026
I assume you were taking a look at this / ready to approve based on the squash request, so r? @Kivooeo |
GenericNerd
commented
Jan 11, 2026
My bad, I thought I just needed to put the status label back to waiting for review! I did squash the commits, removed the emoji and changed the title like you mentioned though :) |
Kivooeo
commented
Jan 11, 2026
I asked for the commits to be squashed as there were quite a few small ones I'll take a final look at the implementation later today - it's 6 am here and it's been a long day, I apologise in advance for any potential delays and appreciate your patience |
Kivooeo
commented
Jan 11, 2026
looks good thanks for your contribution! @bors r=Kivooeo,tgross35 rollup |
Rollup of 9 pull requests Successful merges: - #147938 (Add const cloning of slices and tests) - #149718 (Add freeze file times on Windows) - #150438 (Remove mentions of debootstrap and chroots from the m68k-unknown-none-elf platform support doc) - #150790 (feat: invisible character help string) - #150906 (Simplify `#[eii]` macro using methods on ecx) - #150938 (Port `#[collapse_debuginfo]` to the new attribute parsing system) - #150953 (std: sys: fs: uefi: Implement copy) - #150964 (Completely list all unparsed attributes) - #150975 (ui: add test for normalizing const projections with assoc const equality) Failed merges: - #150972 (Rename EII attributes slightly (being consistent in naming things foreign items, not extern items)) r? @ghost
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #150790 - lexer/help-invisible-character, r=Kivooeo,tgross35 feat: invisible character help string I was playing around with zero width spaces in different programming languages and thought that this error message could be more helpful. Hopefully it's a good first contribution! :)
I was playing around with zero width spaces in different programming languages and thought that this error message could be more helpful. Hopefully it's a good first contribution! :)