]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2013 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | static c: char = | |
12 | '\u539_' //~ ERROR: illegal character in numeric character escape | |
13 | //~^ WARNING: \uABCD escapes are deprecated | |
14 | ; | |
15 | ||
16 | static c2: char = | |
17 | '\Uffffffff' //~ ERROR: illegal numeric character escape | |
18 | //~^ WARNING: \uABCD escapes are deprecated | |
19 | ; | |
20 | ||
21 | static c3: char = | |
22 | '\x1' //~ ERROR: numeric character escape is too short | |
23 | ; | |
24 | ||
25 | static c4: char = | |
26 | '\u23q' //~ ERROR: illegal character in numeric character escape | |
27 | //~^ WARNING: \uABCD escapes are deprecated | |
28 | ; | |
29 | //~^^^ ERROR: numeric character escape is too short | |
30 | ||
31 | static s: &'static str = | |
32 | "\x1" //~ ERROR: numeric character escape is too short | |
33 | ; | |
34 | ||
35 | static s2: &'static str = | |
36 | "\u23q" //~ ERROR: illegal character in numeric character escape | |
37 | //~^ ERROR: numeric character escape is too short | |
38 | //~^^ WARNING: \uABCD escapes are deprecated | |
39 | ; | |
40 | ||
41 | static c: char = | |
42 | '\●' //~ ERROR: unknown character escape | |
43 | ; | |
44 | ||
45 | static s: &'static str = | |
46 | "\●" //~ ERROR: unknown character escape | |
47 | ; | |
48 | ||
49 | // THIS MUST BE LAST, since unterminated character constants kill the lexer | |
50 | ||
51 | static c: char = | |
52 | '● //~ ERROR: unterminated character constant | |
53 | ; |