]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-close-object-into-object-5.base.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-object-into-object-5.base.stderr
CommitLineData
b7449926 1error[E0310]: the parameter type `T` may not live long enough
04454e1e 2 --> $DIR/regions-close-object-into-object-5.rs:21:5
b7449926 3 |
c295e0f8
XL
4LL | Box::new(B(&*v)) as Box<dyn X>
5 | ^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
6 |
7note: ...that is required by this bound
04454e1e 8 --> $DIR/regions-close-object-into-object-5.rs:13:17
c295e0f8
XL
9 |
10LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
11 | ^^
04454e1e
FG
12help: consider adding an explicit lifetime bound...
13 |
14LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
15 | +++++++++
c295e0f8
XL
16
17error[E0310]: the parameter type `T` may not live long enough
04454e1e 18 --> $DIR/regions-close-object-into-object-5.rs:21:5
c295e0f8 19 |
c295e0f8
XL
20LL | Box::new(B(&*v)) as Box<dyn X>
21 | ^^^^^^^^^^^^^^^^ ...so that the type `B<'_, T>` will meet its required lifetime bounds
04454e1e
FG
22 |
23help: consider adding an explicit lifetime bound...
24 |
25LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
26 | +++++++++
b7449926
XL
27
28error[E0310]: the parameter type `T` may not live long enough
04454e1e 29 --> $DIR/regions-close-object-into-object-5.rs:21:14
b7449926 30 |
c295e0f8 31LL | Box::new(B(&*v)) as Box<dyn X>
3c0e092e
XL
32 | ^ ...so that the type `T` will meet its required lifetime bounds...
33 |
34note: ...that is required by this bound
04454e1e 35 --> $DIR/regions-close-object-into-object-5.rs:13:17
3c0e092e
XL
36 |
37LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
38 | ^^
04454e1e
FG
39help: consider adding an explicit lifetime bound...
40 |
41LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
42 | +++++++++
b7449926
XL
43
44error[E0310]: the parameter type `T` may not live long enough
04454e1e 45 --> $DIR/regions-close-object-into-object-5.rs:21:14
b7449926 46 |
c295e0f8
XL
47LL | Box::new(B(&*v)) as Box<dyn X>
48 | ^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
94222f64
XL
49 |
50note: ...that is required by this bound
04454e1e 51 --> $DIR/regions-close-object-into-object-5.rs:13:17
94222f64
XL
52 |
53LL | struct B<'a, T: 'a>(&'a (A<T> + 'a));
54 | ^^
04454e1e
FG
55help: consider adding an explicit lifetime bound...
56 |
57LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
58 | +++++++++
b7449926
XL
59
60error[E0310]: the parameter type `T` may not live long enough
04454e1e 61 --> $DIR/regions-close-object-into-object-5.rs:21:16
b7449926 62 |
c295e0f8
XL
63LL | Box::new(B(&*v)) as Box<dyn X>
64 | ^^^ ...so that the reference type `&dyn A<T>` does not outlive the data it points at
04454e1e
FG
65 |
66help: consider adding an explicit lifetime bound...
67 |
68LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
69 | +++++++++
b7449926
XL
70
71error[E0310]: the parameter type `T` may not live long enough
04454e1e 72 --> $DIR/regions-close-object-into-object-5.rs:21:16
b7449926 73 |
c295e0f8
XL
74LL | Box::new(B(&*v)) as Box<dyn X>
75 | ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
04454e1e
FG
76 |
77help: consider adding an explicit lifetime bound...
78 |
79LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
80 | +++++++++
b7449926 81
dfeec247 82error[E0310]: the parameter type `T` may not live long enough
04454e1e 83 --> $DIR/regions-close-object-into-object-5.rs:21:16
dfeec247 84 |
c295e0f8
XL
85LL | Box::new(B(&*v)) as Box<dyn X>
86 | ^^^ ...so that the type `(dyn A<T> + 'static)` is not borrowed for too long
04454e1e
FG
87 |
88help: consider adding an explicit lifetime bound...
89 |
90LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> {
91 | +++++++++
dfeec247 92
c295e0f8 93error: aborting due to 7 previous errors
b7449926
XL
94
95For more information about this error, try `rustc --explain E0310`.