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