experiment\src\main.rs:3:16 | 3 | "Hello \ | ________________^ 4...">

Miscompilation of is_whitespace inside rustc on Windows-msvc (with -Zdylib-lto) · Issue #109067 · rust-lang/rust (original) (raw)

Code

fn main() { println!( "Hello
• world!" ); }

Current output

warning: non-ASCII whitespace symbol '\u{2022}' is not skipped --> experiment\src\main.rs:3:16 | 3 | "Hello
| ___________^ 4 | | • world!" | | ^ non-ASCII whitespace symbol '\u{2022}' is not skipped | || |

Desired output

No warning, since U+2022 "" is not whitespace.

Anything else?

stable-x86_64-pc-windows-msvc - rustc 1.68.0 (2c8cc3432 2023-03-06)

Weirdly, this warning only occurs on Windows. Unfortunately, I have no Windows systems to test on other than GitHub Actions, so it isn't convenient to test further. I hope this bug report is useful anyway.