fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1note: external requirements 2 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:47 3 | 4LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, 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, 't3> 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<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('s)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed('t3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed('t1)) u32>)), 16 ] 17 = note: late-bound region is '_#3r 18 = note: late-bound region is '_#4r 19 = note: number of external vids: 5 20 = note: where '_#1r: '_#0r 21 22note: no external requirements 23 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:34:1 24 | 25LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 26LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 27LL | | 28LL | | 29... | 30LL | | }); 31LL | | } 32 | |_^ 33 | 34 = note: defining type: supply 35 36error[E0521]: borrowed data escapes outside of function 37 --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:35:5 38 | 39LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { 40 | ------ `cell_a` is a reference that is only valid in the function body 41LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { 42LL | | 43LL | | 44LL | | // Only works if 'x: 'y: 45LL | | demand_y(x, y, x.get()) 46LL | | }); 47 | |______^ `cell_a` escapes the function body here 48 | 49 = help: consider replacing `'a` with `'static` 50 51error: aborting due to previous error 52