rust/tests/ui/issues/auxiliary/issue-2380.rs
2023-01-11 09:32:08 +00:00

14 lines
213 B
Rust

#![crate_name="a"]
#![crate_type = "lib"]
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::new(()) as Box<i<T>+'static>
}