Debian Codegraph @

tests/pass/str_lit.rs

raw symbols SCIP
1 use cstr::cstr;
2 use std::ffi::CStr;
3
4 fn main() {
5 let foo: &'static CStr = cstr!("foo\u{4e00}bar");
6 let expected = b"foo\xe4\xb8\x80bar\0";
7 assert_eq!(foo, CStr::from_bytes_with_nul(expected).unwrap());
8 }