rust/tests/ui/parser/char/whitespace-character-litera...

11 lines
439 B
Rust
Raw Permalink Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

// This tests that the error generated when a character literal has multiple
// characters in it contains a note about non-printing characters.
fn main() {
let _hair_space_around = 'x';
//~^ ERROR: character literal may only contain one codepoint
//~| NOTE: there are non-printing characters, the full sequence is `\u{200a}x\u{200b}`
//~| HELP: consider removing the non-printing characters
//~| SUGGESTION: x
}