Last active: a year ago
use anyhow::Result;
fn main() -> Result<()> {
let v = vec![1, 2, 3];
let p = &v;
let raw_p = p as *const Vec<i32>;
println!("{:?} ptr {:?}", p, raw_p);
let box_p = Box::new(raw_p);
let raw_box = &box_p as *const Box<_>;
println!("{:?} ptr {:?}", box_p, raw_box);
Ok(())
}