blob: 9e69ae051732c260db94b5e91372ad33fa74ec1a [file] [log] [blame]
note: External requirements
--> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
|
LL | with_signature(x, |y| y)
| ^^^^^
|
= note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
'_#1r,
T,
i32,
extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>
]
= note: number of external vids: 3
= note: where T: '_#2r
note: No external requirements
--> $DIR/ty-param-closure-outlives-from-return-type.rs:25:1
|
LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
LL | | where
LL | | T: Debug,
LL | | {
... |
LL | | //~^ ERROR the parameter type `T` may not live long enough
LL | | }
| |_^
|
= note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
'_#1r,
T
]
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
|
LL | with_signature(x, |y| y)
| ^^^^^
|
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
error[E0309]: the parameter type `T` may not live long enough
--> $DIR/ty-param-closure-outlives-from-return-type.rs:51:5
|
LL | x
| ^
|
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0309`.