rust/src/test/ui/parser/byte-literals.rs

16 lines
457 B
Rust
Raw Normal View History

// compile-flags: -Z continue-parse-after-error
2014-06-06 10:04:04 -05:00
// ignore-tidy-tab
static FOO: u8 = b'\f'; //~ ERROR unknown byte escape
pub fn main() {
b'\f'; //~ ERROR unknown byte escape
b'\x0Z'; //~ ERROR invalid character in numeric character escape: Z
2014-06-06 10:04:04 -05:00
b' '; //~ ERROR byte constant must be escaped
b'''; //~ ERROR byte constant must be escaped
b'é'; //~ ERROR byte constant must be ASCII
b'a //~ ERROR unterminated byte constant
}