blob: e2a9bd7e3cd08e0d64a231274f59815e970a9f78 [file] [log] [blame]
note: External requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:24:24
|
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0:11 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]::{{closure}}[0]) with closure substs [
T,
i16,
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)),
]
= note: number of external vids: 2
= note: where T: '_#1r
note: No external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:22:1
|
LL | / fn generic<T>(value: T) {
LL | | let cell = Cell::new(&());
LL | | twice(cell, value, |a, b| invoke(a, b));
LL | | }
| |_^
|
= note: defining type: DefId(0:9 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]) with substs [
T,
]
note: External requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
|
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
= note: defining type: DefId(0:15 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [
T,
i16,
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)),
]
= note: late-bound region is '_#2r
= note: number of external vids: 3
= note: where T: '_#1r
note: No external requirements
--> $DIR/ty-param-closure-approximate-lower-bound.rs:28:1
|
LL | / fn generic_fail<'a, T>(cell: Cell<&'a ()>, value: T) {
LL | | twice(cell, value, |a, b| invoke(a, b));
LL | |
LL | | }
| |_^
|
= note: defining type: DefId(0:12 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]) with substs [
T,
]
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-approximate-lower-bound.rs:29:24
|
LL | twice(cell, value, |a, b| invoke(a, b));
| ^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `T: ReFree(DefId(0:12 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(DefId(0:13 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::'a[0]), 'a))`...
error: aborting due to previous error
For more information about this error, try `rustc --explain E0309`.