@@ -18,17 +18,33 @@ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
18
18
LL | | fn(Inv<'y>)) }
19
19
| |__________________________________________________- in this macro invocation
20
20
21
- error: compilation successful
22
- --> $DIR/hr-subtype.rs:110:1
21
+ error: unsatisfied lifetime constraints
22
+ --> $DIR/hr-subtype.rs:43:13
23
23
|
24
- LL | / fn main() {
25
- LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
26
- LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
27
- LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
28
- LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
29
- LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
30
- LL | | }
31
- | |_^
24
+ LL | fn subtype<'x,'y:'x,'z:'y>() {
25
+ | -- -- lifetime `'y` defined here
26
+ | |
27
+ | lifetime `'x` defined here
28
+ LL | gimme::<$t2>(None::<$t1>);
29
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y`
30
+ ...
31
+ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
32
+ LL | | fn(Inv<'y>)) }
33
+ | |__________________________________________________- in this macro invocation
34
+
35
+ error: unsatisfied lifetime constraints
36
+ --> $DIR/hr-subtype.rs:49:13
37
+ |
38
+ LL | fn supertype<'x,'y:'x,'z:'y>() {
39
+ | -- -- lifetime `'y` defined here
40
+ | |
41
+ | lifetime `'x` defined here
42
+ LL | gimme::<$t1>(None::<$t2>);
43
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'x` must outlive `'y`
44
+ ...
45
+ LL | / check! { free_inv_x_vs_free_inv_y: (fn(Inv<'x>),
46
+ LL | | fn(Inv<'y>)) }
47
+ | |__________________________________________________- in this macro invocation
32
48
33
- error: aborting due to previous error
49
+ error: aborting due to 2 previous errors
34
50
0 commit comments