]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[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 | | |
4 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
5 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
6 | LL | // oh dear! | |
7 | LL | box B(&*v) as Box<X> | |
8 | | ^^^^^^^^^^ | |
9 | | | |
10 | note: ...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 | | |
13 | LL | box B(&*v) as Box<X> | |
14 | | ^^^^^^^^^^ | |
15 | ||
16 | error[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 | | |
19 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
20 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
21 | LL | // oh dear! | |
22 | LL | box B(&*v) as Box<X> | |
23 | | ^^^^^^^^^^^^^^^^^^^^ | |
24 | | | |
25 | note: ...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 | | |
28 | LL | box B(&*v) as Box<X> | |
29 | | ^^^^^^^^^^^^^^^^^^^^ | |
30 | ||
31 | error[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 | | |
34 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
35 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
36 | LL | // oh dear! | |
37 | LL | box B(&*v) as Box<X> | |
38 | | ^ | |
39 | | | |
40 | note: ...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 | | |
43 | LL | box B(&*v) as Box<X> | |
44 | | ^ | |
45 | ||
46 | error[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 | | |
49 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
50 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
51 | LL | // oh dear! | |
52 | LL | box B(&*v) as Box<X> | |
53 | | ^^^^^^ | |
54 | | | |
e1599b0c | 55 | note: ...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 | | |
58 | LL | box B(&*v) as Box<X> | |
59 | | ^^^^^^ | |
60 | ||
61 | error[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 | | |
64 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
65 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
66 | LL | // oh dear! | |
67 | LL | box B(&*v) as Box<X> | |
e1599b0c | 68 | | ^^^ |
b7449926 | 69 | | |
e1599b0c XL |
70 | note: ...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 | | |
73 | LL | box B(&*v) as Box<X> | |
e1599b0c | 74 | | ^^^ |
b7449926 XL |
75 | |
76 | error[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 | | |
79 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
80 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
81 | LL | // oh dear! | |
82 | LL | box B(&*v) as Box<X> | |
83 | | ^^^ | |
84 | | | |
85 | note: ...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 | | |
88 | LL | box B(&*v) as Box<X> | |
89 | | ^^^ | |
90 | ||
dfeec247 XL |
91 | error[E0310]: the parameter type `T` may not live long enough |
92 | --> $DIR/regions-close-object-into-object-5.rs:17:11 | |
93 | | | |
94 | LL | fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> { | |
95 | | - help: consider adding an explicit lifetime bound `T: 'static`... | |
96 | LL | // oh dear! | |
97 | LL | box B(&*v) as Box<X> | |
98 | | ^^^ | |
99 | | | |
100 | note: ...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 | | | |
103 | LL | box B(&*v) as Box<X> | |
104 | | ^^^ | |
105 | ||
106 | error: aborting due to 7 previous errors | |
b7449926 XL |
107 | |
108 | For more information about this error, try `rustc --explain E0310`. |