rust/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs
2023-05-02 10:32:08 +00:00

11 lines
210 B
Rust

// run-pass
#![feature(c_str_literals)]
fn main() {
assert_eq!(
c"\xEF\x80🦀\u{1F980}".to_bytes_with_nul(),
&[0xEF, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0x00],
);
}