1 // Various examples of structs whose fields are not well-formed.
8 trait Trait1<'a, 'b, T> {
12 impl<'a, T> Trait<'a, T> for usize {
13 type Out = &'a T; //~ ERROR `T` may not live long enough
16 struct RefOk<'a, T:'a> {
20 impl<'a, T> Trait<'a, T> for u32 {
21 type Out = RefOk<'a, T>; //~ ERROR `T` may not live long enough
24 impl<'a, 'b, T> Trait1<'a, 'b, T> for u32 {
25 type Out = &'a &'b T; //~ ERROR reference has a longer lifetime than the data