]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error: lifetime may not live long enough |
f035d41b | 2 | --> $DIR/hr-subtype.rs:39:13 |
48663c56 | 3 | | |
f035d41b XL |
4 | LL | fn subtype<'x, 'y: 'x, 'z: 'y>() { |
5 | | -- -- lifetime `'y` defined here | |
48663c56 XL |
6 | | | |
7 | | lifetime `'x` defined here | |
8 | LL | gimme::<$t2>(None::<$t1>); | |
9 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y` | |
10 | ... | |
11 | LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), | |
f035d41b XL |
12 | LL | | fn(Inv<'y>)) } |
13 | | |______________- in this macro invocation | |
60c5eb7d XL |
14 | | |
15 | = help: consider adding the following bound: `'x: 'y` | |
17df50a5 | 16 | = note: this error originates in the macro `check` (in Nightly builds, run with -Z macro-backtrace for more info) |
48663c56 XL |
17 | |
18 | error: lifetime may not live long enough | |
f035d41b | 19 | --> $DIR/hr-subtype.rs:45:13 |
48663c56 | 20 | | |
f035d41b XL |
21 | LL | fn supertype<'x, 'y: 'x, 'z: 'y>() { |
22 | | -- -- lifetime `'y` defined here | |
48663c56 XL |
23 | | | |
24 | | lifetime `'x` defined here | |
25 | LL | gimme::<$t1>(None::<$t2>); | |
26 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y` | |
27 | ... | |
28 | LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>), | |
f035d41b XL |
29 | LL | | fn(Inv<'y>)) } |
30 | | |______________- in this macro invocation | |
60c5eb7d XL |
31 | | |
32 | = help: consider adding the following bound: `'x: 'y` | |
17df50a5 | 33 | = note: this error originates in the macro `check` (in Nightly builds, run with -Z macro-backtrace for more info) |
48663c56 XL |
34 | |
35 | error: aborting due to 2 previous errors | |
36 |