1 note: external requirements
2 --> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
4 LL | twice(cell, value, |a, b| invoke(a, b));
7 = note: defining type: generic::<T>::{closure#0} with closure substs [
9 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) T)),
12 = note: number of external vids: 2
13 = note: where T: '_#1r
15 note: no external requirements
16 --> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
18 LL | fn generic<T>(value: T) {
19 | ^^^^^^^^^^^^^^^^^^^^^^^
21 = note: defining type: generic::<T>
23 note: external requirements
24 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
26 LL | twice(cell, value, |a, b| invoke(a, b));
29 = note: defining type: generic_fail::<T>::{closure#0} with closure substs [
31 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }) ()>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }) T)),
34 = note: late-bound region is '_#2r
35 = note: number of external vids: 3
36 = note: where T: '_#1r
38 note: no external requirements
39 --> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
41 LL | fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 = note: defining type: generic_fail::<T>
46 error[E0309]: the parameter type `T` may not live long enough
47 --> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
49 LL | twice(cell, value, |a, b| invoke(a, b));
50 | ^^^^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
52 help: consider adding an explicit lifetime bound...
54 LL | fn generic_fail<'a, T: 'a>(cell: Cell<&'a ()>, value: T) {
57 error: aborting due to previous error
59 For more information about this error, try `rustc --explain E0309`.