mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
12 lines
227 B
Rust
12 lines
227 B
Rust
// run-pass
|
|
// edition: 2021
|
|
|
|
#![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],
|
|
);
|
|
}
|