rust/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs

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

10 lines
200 B
Rust
Raw Permalink Normal View History

2023-07-16 13:59:05 -05:00
//@ run-pass
2023-07-04 12:40:48 -05:00
//@ edition: 2021
2023-03-06 23:09:19 -06:00
fn main() {
assert_eq!(
c"\xEF\x80🦀\u{1F980}".to_bytes_with_nul(),
&[0xEF, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0x00],
);
}