diff options
Diffstat (limited to 'src/test/ui/associated-type-bounds/implied-region-constraints.stderr')
-rw-r--r-- | src/test/ui/associated-type-bounds/implied-region-constraints.stderr | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/ui/associated-type-bounds/implied-region-constraints.stderr b/src/test/ui/associated-type-bounds/implied-region-constraints.stderr new file mode 100644 index 000000000..cddce8777 --- /dev/null +++ b/src/test/ui/associated-type-bounds/implied-region-constraints.stderr @@ -0,0 +1,28 @@ +error: lifetime may not live long enough + --> $DIR/implied-region-constraints.rs:17:56 + | +LL | fn _bad_st<'a, 'b, T>(x: St<'a, 'b, T>) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _failure_proves_not_implied_outlives_region_b: &'b T = &x.f0; + | ^^^^^ type annotation requires that `'a` must outlive `'b` + | + = help: consider adding the following bound: `'a: 'b` + +error: lifetime may not live long enough + --> $DIR/implied-region-constraints.rs:38:64 + | +LL | fn _bad_en7<'a, 'b, T>(x: En7<'a, 'b, T>) + | -- -- lifetime `'b` defined here + | | + | lifetime `'a` defined here +... +LL | let _failure_proves_not_implied_outlives_region_b: &'b T = &x; + | ^^^^^ type annotation requires that `'a` must outlive `'b` + | + = help: consider adding the following bound: `'a: 'b` + +error: aborting due to 2 previous errors + |