diff options
Diffstat (limited to 'src/test/ui/wf/wf-trait-associated-type-region.stderr')
-rw-r--r-- | src/test/ui/wf/wf-trait-associated-type-region.stderr | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/wf/wf-trait-associated-type-region.stderr b/src/test/ui/wf/wf-trait-associated-type-region.stderr new file mode 100644 index 000000000..6e2cc8aba --- /dev/null +++ b/src/test/ui/wf/wf-trait-associated-type-region.stderr @@ -0,0 +1,12 @@ +error[E0309]: the associated type `<Self as SomeTrait<'a>>::Type1` may not live long enough + --> $DIR/wf-trait-associated-type-region.rs:9:18 + | +LL | type Type2 = &'a Self::Type1; + | ^^^^^^^^^^^^^^^ + | + = help: consider adding an explicit lifetime bound `<Self as SomeTrait<'a>>::Type1: 'a`... + = note: ...so that the reference type `&'a <Self as SomeTrait<'a>>::Type1` does not outlive the data it points at + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0309`. |