1- note: no external requirements
2- --> $DIR/propagate-approximated-fail-no-postdom.rs:43 :9
1+ note: external requirements
2+ --> $DIR/propagate-approximated-fail-no-postdom.rs:44 :9
33 |
44LL | |_outlives1, _outlives2, _outlives3, x, y| {
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,29 +14,66 @@ LL | |_outlives1, _outlives2, _outlives3, x, y| {
1414 = note: late-bound region is '?4
1515 = note: late-bound region is '?5
1616 = note: late-bound region is '?6
17+ = note: number of external vids: 7
18+ = note: where '?2: '?3
19+ = note: where '?1: '?3
20+
21+ note: no external requirements
22+ --> $DIR/propagate-approximated-fail-no-postdom.rs:37:1
23+ |
24+ LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
25+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26+ |
27+ = note: defining type: supply
1728
1829error: lifetime may not live long enough
19- --> $DIR/propagate-approximated-fail-no-postdom.rs:46:13
30+ --> $DIR/propagate-approximated-fail-no-postdom.rs:40:5
2031 |
21- LL | |_outlives1, _outlives2, _outlives3, x, y| {
22- | ---------- ---------- has type `Cell<&'2 &'?3 u32>`
23- | |
24- | has type `Cell<&'?1 &'1 u32>`
32+ LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
33+ | -- -- lifetime `'c` defined here
34+ | |
35+ | lifetime `'a` defined here
2536...
26- LL | demand_y(x, y, p)
27- | ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`
37+ LL | / establish_relationships(
38+ LL | | cell_a,
39+ LL | | cell_b,
40+ LL | | cell_c,
41+ ... |
42+ LL | | },
43+ LL | | );
44+ | |_____^ argument requires that `'a` must outlive `'c`
2845 |
29- = note: requirement occurs because of the type `Cell<&'?34 u32>`, which makes the generic argument `&'?34 u32` invariant
46+ = help: consider adding the following bound: `'a: 'c`
47+ = note: requirement occurs because of the type `Cell<&'?10 u32>`, which makes the generic argument `&'?10 u32` invariant
3048 = note: the struct `Cell<T>` is invariant over the parameter `T`
3149 = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
3250
33- note: no external requirements
34- --> $DIR/propagate-approximated-fail-no-postdom.rs:38:1
51+ error: lifetime may not live long enough
52+ --> $DIR/propagate-approximated-fail-no-postdom.rs:40:5
3553 |
36- LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
37- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+ LL | fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {
55+ | -- -- lifetime `'c` defined here
56+ | |
57+ | lifetime `'b` defined here
58+ ...
59+ LL | / establish_relationships(
60+ LL | | cell_a,
61+ LL | | cell_b,
62+ LL | | cell_c,
63+ ... |
64+ LL | | },
65+ LL | | );
66+ | |_____^ argument requires that `'b` must outlive `'c`
3867 |
39- = note: defining type: supply
68+ = help: consider adding the following bound: `'b: 'c`
69+ = note: requirement occurs because of the type `Cell<&'?10 u32>`, which makes the generic argument `&'?10 u32` invariant
70+ = note: the struct `Cell<T>` is invariant over the parameter `T`
71+ = help: see <https://doc.rust-lang.org/nomicon/subtyping.html> for more information about variance
72+
73+ help: the following changes may resolve your lifetime errors
74+ |
75+ = help: add bound `'a: 'c`
76+ = help: add bound `'b: 'c`
4077
41- error: aborting due to 1 previous error
78+ error: aborting due to 2 previous errors
4279
0 commit comments