1 2 3 4 5 6 7 8 9 10 11 12 13
// run-pass pub trait Foo<T> { fn foo(self) -> T; } impl<'a, T> Foo<T> for &'a str where &'a str: Into<T> { fn foo(self) -> T { panic!(); } } fn main() {}