fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0310]: the parameter type `T` may not live long enough 2 --> $DIR/regions-close-object-into-object-5.rs:17:5 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 11 --> $DIR/regions-close-object-into-object-5.rs:17:5 12 | 13LL | box B(&*v) as Box<X> 14 | ^^^^^^^^^^ 15 16error[E0310]: the parameter type `T` may not live long enough 17 --> $DIR/regions-close-object-into-object-5.rs:17:5 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 26 --> $DIR/regions-close-object-into-object-5.rs:17:5 27 | 28LL | box B(&*v) as Box<X> 29 | ^^^^^^^^^^^^^^^^^^^^ 30 31error[E0310]: the parameter type `T` may not live long enough 32 --> $DIR/regions-close-object-into-object-5.rs:17:9 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 41 --> $DIR/regions-close-object-into-object-5.rs:17:9 42 | 43LL | box B(&*v) as Box<X> 44 | ^ 45 46error[E0310]: the parameter type `T` may not live long enough 47 --> $DIR/regions-close-object-into-object-5.rs:17:9 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 | 55note: ...so that the type `T` will meet its required lifetime bounds 56 --> $DIR/regions-close-object-into-object-5.rs:17:9 57 | 58LL | box B(&*v) as Box<X> 59 | ^^^^^^ 60 61error[E0310]: the parameter type `T` may not live long enough 62 --> $DIR/regions-close-object-into-object-5.rs:17:11 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> 68 | ^^^ 69 | 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 72 | 73LL | box B(&*v) as Box<X> 74 | ^^^ 75 76error[E0310]: the parameter type `T` may not live long enough 77 --> $DIR/regions-close-object-into-object-5.rs:17:11 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 86 --> $DIR/regions-close-object-into-object-5.rs:17:11 87 | 88LL | box B(&*v) as Box<X> 89 | ^^^ 90 91error: aborting due to 6 previous errors 92 93For more information about this error, try `rustc --explain E0310`.