fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1note: external requirements 2 --> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24 3 | 4LL | twice(cell, value, |a, b| invoke(a, b)); 5 | ^^^^^^^^^^^^^^^^^^^ 6 | 7 = note: defining type: generic::<T>::{{closure}}#0 with closure substs [ 8 i16, 9 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed('s)) T)), 10 ] 11 = note: number of external vids: 2 12 = note: where T: '_#1r 13 14note: no external requirements 15 --> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1 16 | 17LL | / fn generic<T>(value: T) { 18LL | | let cell = Cell::new(&()); 19LL | | twice(cell, value, |a, b| invoke(a, b)); 20LL | | } 21 | |_^ 22 | 23 = note: defining type: generic::<T> 24 25note: external requirements 26 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24 27 | 28LL | twice(cell, value, |a, b| invoke(a, b)); 29 | ^^^^^^^^^^^^^^^^^^^ 30 | 31 = note: defining type: generic_fail::<T>::{{closure}}#0 with closure substs [ 32 i16, 33 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed('r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed('s)) T)), 34 ] 35 = note: late-bound region is '_#2r 36 = note: number of external vids: 3 37 = note: where T: '_#1r 38 39note: no external requirements 40 --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1 41 | 42LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) { 43LL | | twice(cell, value, |a, b| invoke(a, b)); 44LL | | 45LL | | } 46 | |_^ 47 | 48 = note: defining type: generic_fail::<T> 49 50error[E0309]: the parameter type `T` may not live long enough 51 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24 52 | 53LL | twice(cell, value, |a, b| invoke(a, b)); 54 | ^^^^^^^^^^^^^^^^^^^ 55 | 56 = help: consider adding an explicit lifetime bound `T: 'a`... 57 58error: aborting due to previous error 59 60For more information about this error, try `rustc --explain E0309`.