1 note: External requirements
2 --> $DIR/ty-param-closure-approximate-lower-bound.rs:34:24
4 LL | twice(cell, value, |a, b| invoke(a, b));
7 = note: defining type: DefId(0/1:14 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
10 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
12 = note: number of external vids: 3
13 = note: where T: '_#1r
15 note: No external requirements
16 --> $DIR/ty-param-closure-approximate-lower-bound.rs:32:1
18 LL | / fn generic<T>(value: T) {
19 LL | | let cell = Cell::new(&());
20 LL | | twice(cell, value, |a, b| invoke(a, b));
24 = note: defining type: DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
28 note: External requirements
29 --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24
31 LL | twice(cell, value, |a, b| invoke(a, b));
34 = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
37 for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
39 = note: number of external vids: 4
40 = note: where T: '_#1r
42 note: No external requirements
43 --> $DIR/ty-param-closure-approximate-lower-bound.rs:38:1
45 LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
46 LL | | twice(cell, value, |a, b| invoke(a, b));
47 LL | | //~^ ERROR the parameter type `T` may not live long enough
51 = note: defining type: DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
55 error[E0309]: the parameter type `T` may not live long enough
56 --> $DIR/ty-param-closure-approximate-lower-bound.rs:39:24
58 LL | twice(cell, value, |a, b| invoke(a, b));
61 = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a))`...
63 error: aborting due to previous error
65 For more information about this error, try `rustc --explain E0309`.