error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-struct-not-wf.rs:19:5 | LL | struct Ref<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... LL | field: &'a T | ^^^^^^^^^^^^ | note: ...so that the reference type `&'a T` does not outlive the data it points at --> $DIR/regions-struct-not-wf.rs:19:5 | LL | field: &'a T | ^^^^^^^^^^^^ error[E0309]: the parameter type `T` may not live long enough --> $DIR/regions-struct-not-wf.rs:29:5 | LL | struct RefIndirect<'a, T> { | - help: consider adding an explicit lifetime bound `T: 'a`... LL | field: RefOk<'a, T> | ^^^^^^^^^^^^^^^^^^^ | note: ...so that the type `T` will meet its required lifetime bounds --> $DIR/regions-struct-not-wf.rs:29:5 | LL | field: RefOk<'a, T> | ^^^^^^^^^^^^^^^^^^^ error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references --> $DIR/regions-struct-not-wf.rs:35:5 | LL | field: &'a &'b T | ^^^^^^^^^^^^^^^^ | note: the pointer is valid for the lifetime 'a as defined on the struct at 34:18 --> $DIR/regions-struct-not-wf.rs:34:18 | LL | struct DoubleRef<'a, 'b, T> { | ^^ note: but the referenced data is only valid for the lifetime 'b as defined on the struct at 34:22 --> $DIR/regions-struct-not-wf.rs:34:22 | LL | struct DoubleRef<'a, 'b, T> { | ^^ error: aborting due to 3 previous errors Some errors occurred: E0309, E0491. For more information about an error, try `rustc --explain E0309`.