#![allow(unused_variables)] fn main() { use std::rc::Rc; let x = Rc::new("hello".to_owned()); let x_ptr = Rc::into_raw(x); unsafe { let x = Rc::from_raw(x_ptr); assert_eq!(&* x, "hello"); } }