#![allow(unused_variables)] fn main() { use std::ffi::{CStr, CString}; let boxed: Box = Box::from(c"foo"); let c_string: CString = c"foo".to_owned(); assert_eq!(boxed.into_c_string(), c_string); }