fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error[E0309]: the parameter type `T` may not live long enough 2 --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9: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 fn(T); 7 | ^^^^^^^^^^^^^^^^^^^^^ 8 | 9note: ...so that the reference type `&'a fn(T)` does not outlive the data it points at 10 --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:9:5 11 | 12LL | type Out = &'a fn(T); 13 | ^^^^^^^^^^^^^^^^^^^^^ 14 15error[E0309]: the parameter type `T` may not live long enough 16 --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5 17 | 18LL | impl<'a, T> Trait<'a, T> for u32 { 19 | - help: consider adding an explicit lifetime bound `T: 'a`... 20LL | type Out = &'a dyn Baz<T>; 21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 22 | 23note: ...so that the reference type `&'a (dyn Baz<T> + 'a)` does not outlive the data it points at 24 --> $DIR/wf-outlives-ty-in-fn-or-trait.rs:19:5 25 | 26LL | type Out = &'a dyn Baz<T>; 27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 28 29error: aborting due to 2 previous errors 30 31For more information about this error, try `rustc --explain E0309`.