rust/tests/ui/parser/byte-literals.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
425 B
Rust
Raw Normal View History

2014-06-06 15:04:04 +00: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 15:04:04 +00:00
b' '; //~ ERROR byte constant must be escaped
b'''; //~ ERROR byte constant must be escaped
b'é'; //~ ERROR non-ASCII character in byte literal
2020-06-12 12:01:53 +00:00
b'a //~ ERROR unterminated byte constant [E0763]
2014-06-06 15:04:04 +00:00
}