1 // This code used to produce an ICE on the definition of trait Bar
2 // with the following message:
4 // Type parameter out of range when substituting in region 'a (root
5 // type=fn(Self) -> 'astr) (space=FnSpace, index=0)
7 // Regression test for issue #16218.
14 fn dummy(&'a self) { }
15 fn bar<'b, T: Bar<'b>>(self) -> &'b str;
18 impl<'a> Foo<'a> for &'a str {
19 fn bar<T: Bar<'a>>(self) -> &'a str { panic!() } //~ ERROR lifetime