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