-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-UnicodeArea: UnicodeArea: UnicodeA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
Given the following code:
fn main() {
let x = vec!['<'];
println!("{:?}", x);
}
(which has a zero width space between the <
and its ending '
)
The current output is:
error: character literal may only contain one codepoint
--> src/main.rs:2:18
|
2 | let x = vec!['<'];
| ^^^
|
help: if you meant to write a `str` literal, use double quotes
|
2 | let x = vec!["<"];
| ~~~
If there are any non-printing characters, show where they are (debug unicode representation on the whole string, maybe?), and if there's only one printing character, make a suggestion to remove everything but the printing character.
Metadata
Metadata
Assignees
Labels
A-UnicodeArea: UnicodeArea: UnicodeA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints