1 warning: not reporting region error due to nll
2 --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:27
4 LL | with_signature(x, |y| y)
7 warning: not reporting region error due to nll
8 --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5
13 note: External requirements
14 --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
16 LL | with_signature(x, |y| y)
19 = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
23 extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<std::fmt::Debug + '_#2r>
25 = note: number of external vids: 3
26 = note: where T: '_#2r
28 error[E0309]: the parameter type `T` may not live long enough
29 --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
31 LL | with_signature(x, |y| y)
34 = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
36 note: No external requirements
37 --> $DIR/ty-param-closure-outlives-from-return-type.rs:25:1
39 LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
44 LL | | //~| ERROR the parameter type `T` may not live long enough
48 = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
53 error[E0309]: the parameter type `T` may not live long enough
54 --> $DIR/ty-param-closure-outlives-from-return-type.rs:52:5
59 = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
61 error: aborting due to 2 previous errors
63 For more information about this error, try `rustc --explain E0309`.