Closed
Description
#![crate_type="lib"]
pub trait Foo<'a, T> {
fn foo(&self);
}
pub fn foo<'a, T>(x: &'a Foo<'a, T>) {
let x: &'a Foo<T> = x;
// ^ the lifetime parameter of Foo is left to be infered.
x.foo();
// ^ encoding this method call in metadata triggers an ICE.
}
This is caused by writeback leaving around ReInfer
in the MethodCallee
associated with a method call (because MethodOrigin
is not type-folded at all).
cc @nikomatsakis