mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
14 lines
213 B
Rust
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>
|
|
}
|