]> git.proxmox.com Git - rustc.git/blob - tests/ui/parser/unicode-character-literal.fixed
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / parser / unicode-character-literal.fixed
1 // Regression test for #88684: Improve diagnostics for combining marks
2 // in character literals.
3
4 // run-rustfix
5
6 fn main() {
7 let _spade = "♠️";
8 //~^ ERROR: character literal may only contain one codepoint
9 //~| NOTE: this `♠` is followed by the combining mark `\u{fe0f}`
10 //~| HELP: if you meant to write a `str` literal, use double quotes
11
12 let _s = "ṩ̂̊";
13 //~^ ERROR: character literal may only contain one codepoint
14 //~| NOTE: this `s` is followed by the combining marks `\u{323}\u{307}\u{302}\u{30a}`
15 //~| HELP: if you meant to write a `str` literal, use double quotes
16
17 let _a = 'Å';
18 //~^ ERROR: character literal may only contain one codepoint
19 //~| NOTE: this `A` is followed by the combining mark `\u{30a}`
20 //~| HELP: consider using the normalized form `\u{c5}` of this character
21 }