]> git.lizzy.rs Git - rust.git/blob - src/test/ui/parser/issue-23620-invalid-escapes.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / parser / issue-23620-invalid-escapes.rs
1 fn main() {
2     let _ = b"\u{a66e}";
3     //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
4
5     let _ = b'\u{a66e}';
6     //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
7
8     let _ = b'\u';
9     //~^ ERROR incorrect unicode escape sequence
10
11     let _ = b'\x5';
12     //~^ ERROR numeric character escape is too short
13
14     let _ = b'\xxy';
15     //~^ ERROR invalid character in numeric character escape: x
16
17     let _ = '\x5';
18     //~^ ERROR numeric character escape is too short
19
20     let _ = '\xxy';
21     //~^ ERROR invalid character in numeric character escape: x
22
23     let _ = b"\u{a4a4} \xf \u";
24     //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
25     //~^^ ERROR invalid character in numeric character escape:
26     //~^^^ ERROR incorrect unicode escape sequence
27
28     let _ = "\xf \u";
29     //~^ ERROR invalid character in numeric character escape:
30     //~^^ ERROR incorrect unicode escape sequence
31
32     let _ = "\u8f";
33     //~^ ERROR incorrect unicode escape sequence
34 }