summaryrefslogtreecommitdiffstats
path: root/vendor/cstr/tests/pass/byte_str_lit.rs
blob: fd87f176c2804efcc2ef8980d85ccf8a051b97eb (plain)
1
2
3
4
5
6
7
use cstr::cstr;
use std::ffi::CStr;

fn main() {
    let foo: &'static CStr = cstr!(b"foo\xffbar");
    assert_eq!(foo, CStr::from_bytes_with_nul(b"foo\xffbar\0").unwrap());
}