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