]>
Commit | Line | Data |
---|---|---|
dfeec247 | 1 | note: external requirements |
0731742a | 2 | --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47 |
ff7c6d11 | 3 | | |
0531ce1d | 4 | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { |
ff7c6d11 | 5 | | _______________________________________________^ |
532ac7d7 | 6 | LL | | |
0531ce1d XL |
7 | LL | | |
8 | LL | | // Only works if 'x: 'y: | |
b7449926 | 9 | LL | | demand_y(x, y, x.get()) |
0531ce1d | 10 | LL | | }); |
ff7c6d11 XL |
11 | | |_____^ |
12 | | | |
60c5eb7d | 13 | = note: defining type: supply::{{closure}}#0 with closure substs [ |
ff7c6d11 | 14 | i16, |
60c5eb7d | 15 | for<'r, 's, 't0, 't1, 't2> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed('r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t2)) u32>)), |
ba9703b0 | 16 | (), |
ff7c6d11 | 17 | ] |
b7449926 XL |
18 | = note: late-bound region is '_#2r |
19 | = note: late-bound region is '_#3r | |
8faf50e0 | 20 | = note: number of external vids: 4 |
ff7c6d11 XL |
21 | = note: where '_#1r: '_#0r |
22 | ||
dfeec247 | 23 | note: no external requirements |
0731742a | 24 | --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1 |
b7449926 XL |
25 | | |
26 | LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { | |
27 | LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | |
532ac7d7 | 28 | LL | | |
0bf4aa26 | 29 | LL | | |
b7449926 XL |
30 | ... | |
31 | LL | | }); | |
32 | LL | | } | |
33 | | |_^ | |
34 | | | |
60c5eb7d | 35 | = note: defining type: supply |
b7449926 | 36 | |
0bf4aa26 | 37 | error[E0521]: borrowed data escapes outside of function |
0731742a | 38 | --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:5 |
ff7c6d11 | 39 | | |
8faf50e0 XL |
40 | LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { |
41 | | ------ `cell_a` is a reference that is only valid in the function body | |
94b46f34 | 42 | LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { |
532ac7d7 | 43 | LL | | |
0531ce1d XL |
44 | LL | | |
45 | LL | | // Only works if 'x: 'y: | |
b7449926 | 46 | LL | | demand_y(x, y, x.get()) |
0531ce1d | 47 | LL | | }); |
8faf50e0 | 48 | | |______^ `cell_a` escapes the function body here |
60c5eb7d XL |
49 | | |
50 | = help: consider replacing `'a` with `'static` | |
ff7c6d11 | 51 | |
0bf4aa26 | 52 | error: aborting due to previous error |
ff7c6d11 | 53 |