Skip to content

Instantly share code, notes, and snippets.

@sinkuu
sinkuu / playground.rs
Created October 7, 2016 06:55 — forked from anonymous/playground.rs
Shared via Rust Playground
#![feature(unsize)]
use std::fmt::Debug;
use std::marker::Unsize;
fn foo<T: Unsize<Debug> + 'static>(mut t: T) {
let t = unsafe { Box::from_raw(&mut t as *mut _) } as Box<Debug>;
println!("{:?}", t);
}