1 // Regression test for issue #48276 - ICE when self type does not match what is
2 // required by a trait and regions are involved.
10 impl<'a, 'b> MyFrom<A> for &'a str {
11 fn from(self: &'a Self) -> &'b str {
12 //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait
21 //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait
26 impl From<A> for &'static str {
27 fn from(&self) -> &'static str {
28 //~^ ERROR: method `from` has a `&self` declaration in the impl, but not in the trait