rust/src/test/ui/issues/auxiliary/issue-2380.rs
2019-07-27 18:56:16 +03:00

16 lines
232 B
Rust

#![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>
}