2016-04-26 12:51:14 -05:00
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
pub trait Foo<'a, T> {
|
|
|
|
fn foo(&'a self) -> T;
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {
|
|
|
|
let x: &'a Foo<T> = x;
|
|
|
|
// ^ the lifetime parameter of Foo is left to be inferred.
|
|
|
|
x.foo()
|
|
|
|
// ^ encoding this method call in metadata triggers an ICE.
|
2015-03-18 16:05:24 -05:00
|
|
|
}
|