]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-bounds.nll.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-bounds.nll.stderr
1 error: unsatisfied lifetime constraints
2   --> $DIR/regions-bounds.rs:19:12
3    |
4 LL | fn a_fn1<'a,'b>(e: an_enum<'a>) -> an_enum<'b> {
5    |          -- -- lifetime `'b` defined here
6    |          |
7    |          lifetime `'a` defined here
8 LL |     return e; //~ ERROR mismatched types
9    |            ^ returning this value requires that `'a` must outlive `'b`
10
11 error: unsatisfied lifetime constraints
12   --> $DIR/regions-bounds.rs:23:12
13    |
14 LL | fn a_fn3<'a,'b>(e: a_class<'a>) -> a_class<'b> {
15    |          -- -- lifetime `'b` defined here
16    |          |
17    |          lifetime `'a` defined here
18 LL |     return e; //~ ERROR mismatched types
19    |            ^ returning this value requires that `'a` must outlive `'b`
20
21 error: aborting due to 2 previous errors
22