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