fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0309]: the parameter type `T` may not live long enough 2 --> $DIR/regions-struct-not-wf.rs:13:5 3 | 4LL | impl<'a, T> Trait<'a, T> for usize { 5 | - help: consider adding an explicit lifetime bound...: `T: 'a` 6LL | type Out = &'a T; 7 | ^^^^^^^^^^^^^^^^^ 8 | 9note: ...so that the reference type `&'a T` does not outlive the data it points at 10 --> $DIR/regions-struct-not-wf.rs:13:5 11 | 12LL | type Out = &'a T; 13 | ^^^^^^^^^^^^^^^^^ 14 15error[E0309]: the parameter type `T` may not live long enough 16 --> $DIR/regions-struct-not-wf.rs:21:5 17 | 18LL | impl<'a, T> Trait<'a, T> for u32 { 19 | - help: consider adding an explicit lifetime bound...: `T: 'a` 20LL | type Out = RefOk<'a, T>; 21 | ^^^^^^^^^^^^^^^^^^^^^^^^ 22 | 23note: ...so that the type `T` will meet its required lifetime bounds 24 --> $DIR/regions-struct-not-wf.rs:21:5 25 | 26LL | type Out = RefOk<'a, T>; 27 | ^^^^^^^^^^^^^^^^^^^^^^^^ 28 29error[E0491]: in type `&'a &'b T`, reference has a longer lifetime than the data it references 30 --> $DIR/regions-struct-not-wf.rs:25:5 31 | 32LL | type Out = &'a &'b T; 33 | ^^^^^^^^^^^^^^^^^^^^^ 34 | 35note: the pointer is valid for the lifetime `'a` as defined on the impl at 24:6 36 --> $DIR/regions-struct-not-wf.rs:24:6 37 | 38LL | impl<'a, 'b, T> Trait1<'a, 'b, T> for u32 { 39 | ^^ 40note: but the referenced data is only valid for the lifetime `'b` as defined on the impl at 24:10 41 --> $DIR/regions-struct-not-wf.rs:24:10 42 | 43LL | impl<'a, 'b, T> Trait1<'a, 'b, T> for u32 { 44 | ^^ 45 46error: aborting due to 3 previous errors 47 48Some errors have detailed explanations: E0309, E0491. 49For more information about an error, try `rustc --explain E0309`.