diff options
Diffstat (limited to 'tests/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr')
-rw-r--r-- | tests/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr b/tests/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr new file mode 100644 index 000000000..4ba1778d6 --- /dev/null +++ b/tests/ui/rfc-2093-infer-outlives/regions-outlives-nominal-type-type.stderr @@ -0,0 +1,20 @@ +error[E0491]: in type `&'a Foo<&'b i32>`, reference has a longer lifetime than the data it references + --> $DIR/regions-outlives-nominal-type-type.rs:17:20 + | +LL | type Out = &'a Foo<&'b i32>; + | ^^^^^^^^^^^^^^^^ + | +note: the pointer is valid for the lifetime `'a` as defined here + --> $DIR/regions-outlives-nominal-type-type.rs:16:10 + | +LL | impl<'a, 'b> Trait<'a, 'b> for usize { + | ^^ +note: but the referenced data is only valid for the lifetime `'b` as defined here + --> $DIR/regions-outlives-nominal-type-type.rs:16:14 + | +LL | impl<'a, 'b> Trait<'a, 'b> for usize { + | ^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0491`. |