2 fn list_name() -> &'a str;
5 trait Collection { fn len(&self) -> usize; }
7 // is now well formed. RFC 2093
8 struct List<'a, T: ListItem<'a>> {
12 impl<'a, T: ListItem<'a>> Collection for List<'a, T> {
13 fn len(&self) -> usize {
20 //~^ ERROR may not live long enough
24 fn foo<'a, L: X<&'a Nested<K>>>();
25 //~^ ERROR may not live long enough
27 // check that we give a sane error for `Self`
28 fn bar<'a, L: X<&'a Nested<Self>>>();
29 //~^ ERROR may not live long enough
31 // check that we give a sane error for nested generics
32 fn baz<'a, L, M: X<&'a Nested<L>>>() {
33 //~^ ERROR may not live long enough
41 fn generic_in_parent<'a, L: X<&'a Nested<K>>>() {
42 //~^ ERROR may not live long enough
44 fn generic_in_child<'a, 'b, L: X<&'a Nested<M>>, M: 'b>() {
45 //~^ ERROR may not live long enough