1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#![crate_name="a"] #![crate_type = "lib"] #![feature(box_syntax)] pub trait i<T> { fn dummy(&self, t: T) -> T { panic!() } } pub fn f<T>() -> Box<i<T>+'static> { impl<T> i<T> for () { } box () as Box<i<T>+'static> }