]>
Commit | Line | Data |
---|---|---|
b7449926 | 1 | error[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 |
4 | LL | Box::new(B(&*v)) as Box<dyn X> |
5 | | ^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds... | |
6 | | | |
7 | note: ...that is required by this bound | |
04454e1e | 8 | --> $DIR/regions-close-object-into-object-5.rs:13:17 |
c295e0f8 XL |
9 | | |
10 | LL | struct B<'a, T: 'a>(&'a (A<T> + 'a)); | |
11 | | ^^ | |
04454e1e FG |
12 | help: consider adding an explicit lifetime bound... |
13 | | | |
14 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
15 | | +++++++++ | |
c295e0f8 XL |
16 | |
17 | error[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 |
20 | LL | Box::new(B(&*v)) as Box<dyn X> |
21 | | ^^^^^^^^^^^^^^^^ ...so that the type `B<'_, T>` will meet its required lifetime bounds | |
04454e1e FG |
22 | | |
23 | help: consider adding an explicit lifetime bound... | |
24 | | | |
25 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
26 | | +++++++++ | |
b7449926 XL |
27 | |
28 | error[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 | 31 | LL | Box::new(B(&*v)) as Box<dyn X> |
3c0e092e XL |
32 | | ^ ...so that the type `T` will meet its required lifetime bounds... |
33 | | | |
34 | note: ...that is required by this bound | |
04454e1e | 35 | --> $DIR/regions-close-object-into-object-5.rs:13:17 |
3c0e092e XL |
36 | | |
37 | LL | struct B<'a, T: 'a>(&'a (A<T> + 'a)); | |
38 | | ^^ | |
04454e1e FG |
39 | help: consider adding an explicit lifetime bound... |
40 | | | |
41 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
42 | | +++++++++ | |
b7449926 XL |
43 | |
44 | error[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 |
47 | LL | Box::new(B(&*v)) as Box<dyn X> |
48 | | ^^^^^^ ...so that the type `T` will meet its required lifetime bounds... | |
94222f64 XL |
49 | | |
50 | note: ...that is required by this bound | |
04454e1e | 51 | --> $DIR/regions-close-object-into-object-5.rs:13:17 |
94222f64 XL |
52 | | |
53 | LL | struct B<'a, T: 'a>(&'a (A<T> + 'a)); | |
54 | | ^^ | |
04454e1e FG |
55 | help: consider adding an explicit lifetime bound... |
56 | | | |
57 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
58 | | +++++++++ | |
b7449926 XL |
59 | |
60 | error[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 |
63 | LL | 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 | | |
66 | help: consider adding an explicit lifetime bound... | |
67 | | | |
68 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
69 | | +++++++++ | |
b7449926 XL |
70 | |
71 | error[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 |
74 | LL | 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 | | |
77 | help: consider adding an explicit lifetime bound... | |
78 | | | |
79 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
80 | | +++++++++ | |
b7449926 | 81 | |
dfeec247 | 82 | error[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 |
85 | LL | 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 | | |
88 | help: consider adding an explicit lifetime bound... | |
89 | | | |
90 | LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { | |
91 | | +++++++++ | |
dfeec247 | 92 | |
c295e0f8 | 93 | error: aborting due to 7 previous errors |
b7449926 XL |
94 | |
95 | For more information about this error, try `rustc --explain E0310`. |