]> git.lizzy.rs Git - rust.git/blob - src/test/ui/wf/wf-trait-associated-type-region.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / wf / wf-trait-associated-type-region.stderr
1 error[E0309]: the associated type `<Self as SomeTrait<'a>>::Type1` may not live long enough
2   --> $DIR/wf-trait-associated-type-region.rs:19:5
3    |
4 LL |     type Type2 = &'a Self::Type1;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = help: consider adding an explicit lifetime bound `<Self as SomeTrait<'a>>::Type1: 'a`...
8 note: ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at
9   --> $DIR/wf-trait-associated-type-region.rs:19:5
10    |
11 LL |     type Type2 = &'a Self::Type1;
12    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0309`.