-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
let b = "foo\
bar";
let c = "foo\
bar";
dbg!((b,c));
[src/main.rs:6] (b, c) = (
"foobar",
"foo\u{a0} bar",
)
Like we have confusables lints, I think this should have a warning noting that the particular kind of whitespace is not actually being skipped here, since that's completely invisible when looking at the code.
(Based on rust-lang/reference#1042 I think this would warn for things where char::is_whitespace
is true but that isn't ' ', '\t', '\r', or '\n' -- with #87319 being a related lint that would warn on '\r' and '\n' after the first one.)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.