2016-04-26 10:51:14 -07:00
|
|
|
#![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 () { }
|
|
|
|
|
|
2022-07-07 04:36:10 +02:00
|
|
|
Box::new(()) as Box<i<T>+'static>
|
2015-03-18 22:05:24 +01:00
|
|
|
}
|