]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.stderr
5215f6a52771198b0a8e6a859110bce9f37326f8
[rust.git] / src / test / ui / nll / ty-outlives / ty-param-closure-outlives-from-return-type.stderr
1 note: External requirements
2   --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
3    |
4 LL |     with_signature(x, |y| y)
5    |                       ^^^^^
6    |
7    = note: defining type: DefId(0/1:14 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]::{{closure}}[0]) with closure substs [
8                '_#1r,
9                T,
10                i32,
11                extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>
12            ]
13    = note: number of external vids: 4
14    = note: where T: '_#2r
15
16 note: No external requirements
17   --> $DIR/ty-param-closure-outlives-from-return-type.rs:25:1
18    |
19 LL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Debug + 'a>
20 LL | | where
21 LL | |     T: Debug,
22 LL | | {
23 ...  |
24 LL | |     //~^ ERROR the parameter type `T` may not live long enough
25 LL | | }
26    | |_^
27    |
28    = note: defining type: DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]) with substs [
29                '_#1r,
30                T
31            ]
32
33 error[E0309]: the parameter type `T` may not live long enough
34   --> $DIR/ty-param-closure-outlives-from-return-type.rs:36:23
35    |
36 LL |     with_signature(x, |y| y)
37    |                       ^^^^^
38    |
39    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
40
41 error[E0309]: the parameter type `T` may not live long enough
42   --> $DIR/ty-param-closure-outlives-from-return-type.rs:51:5
43    |
44 LL |     x
45    |     ^
46    |
47    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
48
49 error: aborting due to 2 previous errors
50
51 For more information about this error, try `rustc --explain E0309`.