fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1note: external requirements 2 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:47 3 | 4LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 5 | _______________________________________________^ 6LL | | 7LL | | 8LL | | // Only works if 'x: 'y: 9LL | | demand_y(x, y, x.get()) 10LL | | }); 11 | |_____^ 12 | 13 = note: defining type: supply::{{closure}}#0 with closure substs [ 14 i16, 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>)), 16 (), 17 ] 18 = note: late-bound region is '_#2r 19 = note: late-bound region is '_#3r 20 = note: number of external vids: 4 21 = note: where '_#1r: '_#0r 22 23note: no external requirements 24 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:31:1 25 | 26LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 27LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 28LL | | 29LL | | 30... | 31LL | | }); 32LL | | } 33 | |_^ 34 | 35 = note: defining type: supply 36 37error[E0521]: borrowed data escapes outside of function 38 --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:32:5 39 | 40LL | 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 42LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { 43LL | | 44LL | | 45LL | | // Only works if 'x: 'y: 46LL | | demand_y(x, y, x.get()) 47LL | | }); 48 | |______^ `cell_a` escapes the function body here 49 | 50 = help: consider replacing `'a` with `'static` 51 52error: aborting due to previous error 53