]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/bad-char-literals.rs
Rollup merge of #92024 - pcwalton:per-codegen-unit-names, r=davidtwco
[rust.git] / src / test / ui / parser / bad-char-literals.rs
1 // ignore-tidy-cr
2 // ignore-tidy-tab
3
4 fn main() {
5     // these literals are just silly.
6     ''';
7     //~^ ERROR: character constant must be escaped: `'`
8
9     // note that this is a literal "\n" byte
10     '
11 ';
12     //~^^ ERROR: character constant must be escaped: `\n`
13
14     // note that this is a literal "\r" byte
15     '\r'; //~ ERROR: character constant must be escaped: `\r`
16
17     // note that this is a literal tab character here
18     '   ';
19     //~^ ERROR: character constant must be escaped: `\t`
20 }