1 // Copyright 2015 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.
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.
11 // compile-flags: -Z parse-only -Z continue-parse-after-error
15 //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
18 //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
21 //~^ ERROR incorrect unicode escape sequence
22 //~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
25 //~^ ERROR numeric character escape is too short
28 //~^ ERROR invalid character in numeric character escape: x
29 //~^^ ERROR invalid character in numeric character escape: y
32 //~^ ERROR numeric character escape is too short
35 //~^ ERROR invalid character in numeric character escape: x
36 //~^^ ERROR invalid character in numeric character escape: y
38 let _ = b"\u{a4a4} \xf \u";
39 //~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
40 //~^^ ERROR invalid character in numeric character escape:
41 //~^^^ ERROR incorrect unicode escape sequence
42 //~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
45 //~^ ERROR invalid character in numeric character escape:
46 //~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
47 //~^^^ ERROR incorrect unicode escape sequence