2019-01-06 09:33:05 -06:00
|
|
|
// compile-flags: -Z continue-parse-after-error
|
2016-03-25 19:36:03 -05:00
|
|
|
|
2015-03-26 03:38:25 -05:00
|
|
|
fn main() {
|
|
|
|
let _ = b"\u{a66e}";
|
|
|
|
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
|
|
|
|
|
|
|
let _ = b'\u{a66e}';
|
|
|
|
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
|
|
|
|
|
|
|
let _ = b'\u';
|
2015-07-10 14:31:44 -05:00
|
|
|
//~^ ERROR incorrect unicode escape sequence
|
|
|
|
//~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
2015-03-26 03:38:25 -05:00
|
|
|
|
|
|
|
let _ = b'\x5';
|
|
|
|
//~^ ERROR numeric character escape is too short
|
|
|
|
|
|
|
|
let _ = b'\xxy';
|
2015-07-26 19:49:38 -05:00
|
|
|
//~^ ERROR invalid character in numeric character escape: x
|
|
|
|
//~^^ ERROR invalid character in numeric character escape: y
|
2015-03-26 03:38:25 -05:00
|
|
|
|
|
|
|
let _ = '\x5';
|
|
|
|
//~^ ERROR numeric character escape is too short
|
|
|
|
|
|
|
|
let _ = '\xxy';
|
2015-07-26 19:49:38 -05:00
|
|
|
//~^ ERROR invalid character in numeric character escape: x
|
|
|
|
//~^^ ERROR invalid character in numeric character escape: y
|
2015-03-26 03:38:25 -05:00
|
|
|
|
|
|
|
let _ = b"\u{a4a4} \xf \u";
|
|
|
|
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
2015-07-26 19:49:38 -05:00
|
|
|
//~^^ ERROR invalid character in numeric character escape:
|
2015-07-10 14:31:44 -05:00
|
|
|
//~^^^ ERROR incorrect unicode escape sequence
|
|
|
|
//~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
2015-03-26 03:38:25 -05:00
|
|
|
|
2017-08-17 13:02:13 -05:00
|
|
|
let _ = "\xf \u";
|
|
|
|
//~^ ERROR invalid character in numeric character escape:
|
|
|
|
//~^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
|
|
|
|
//~^^^ ERROR incorrect unicode escape sequence
|
2018-12-27 13:21:47 -06:00
|
|
|
|
|
|
|
let _ = "\u8f";
|
|
|
|
//~^ ERROR incorrect unicode escape sequence
|
2015-03-26 03:38:25 -05:00
|
|
|
}
|