]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-close-object-into-object-5.stderr
Merge remote-tracking branch 'upstream/master'
[rust.git] / src / test / ui / regions / regions-close-object-into-object-5.stderr
1 error[E0310]: the parameter type `T` may not live long enough
2   --> $DIR/regions-close-object-into-object-5.rs:17:5
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
11   --> $DIR/regions-close-object-into-object-5.rs:17:5
12    |
13 LL |     box B(&*v) as Box<X>
14    |     ^^^^^^^^^^
15
16 error[E0310]: the parameter type `T` may not live long enough
17   --> $DIR/regions-close-object-into-object-5.rs:17:5
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
26   --> $DIR/regions-close-object-into-object-5.rs:17:5
27    |
28 LL |     box B(&*v) as Box<X>
29    |     ^^^^^^^^^^^^^^^^^^^^
30
31 error[E0310]: the parameter type `T` may not live long enough
32   --> $DIR/regions-close-object-into-object-5.rs:17:9
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
41   --> $DIR/regions-close-object-into-object-5.rs:17:9
42    |
43 LL |     box B(&*v) as Box<X>
44    |         ^
45
46 error[E0310]: the parameter type `T` may not live long enough
47   --> $DIR/regions-close-object-into-object-5.rs:17:9
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    |
55 note: ...so that the reference type `&dyn A<T>` does not outlive the data it points at
56   --> $DIR/regions-close-object-into-object-5.rs:17:9
57    |
58 LL |     box B(&*v) as Box<X>
59    |         ^^^^^^
60
61 error[E0310]: the parameter type `T` may not live long enough
62   --> $DIR/regions-close-object-into-object-5.rs:17:9
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>
68    |         ^^^^^^
69    |
70 note: ...so that the type `T` will meet its required lifetime bounds
71   --> $DIR/regions-close-object-into-object-5.rs:17:9
72    |
73 LL |     box B(&*v) as Box<X>
74    |         ^^^^^^
75
76 error[E0310]: the parameter type `T` may not live long enough
77   --> $DIR/regions-close-object-into-object-5.rs:17:11
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
86   --> $DIR/regions-close-object-into-object-5.rs:17:11
87    |
88 LL |     box B(&*v) as Box<X>
89    |           ^^^
90
91 error: aborting due to 6 previous errors
92
93 For more information about this error, try `rustc --explain E0310`.