fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0310]: the parameter type `T` may not live long enough 2 --> $DIR/regions-close-object-into-object-5.rs:17:5 3 | 4LL | Box::new(B(&*v)) as Box<dyn X> 5 | ^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds 6 | 7help: consider adding an explicit lifetime bound... 8 | 9LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { 10 | +++++++++ 11 12error[E0310]: the parameter type `T` may not live long enough 13 --> $DIR/regions-close-object-into-object-5.rs:17:5 14 | 15LL | Box::new(B(&*v)) as Box<dyn X> 16 | ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds 17 | 18help: consider adding an explicit lifetime bound... 19 | 20LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { 21 | +++++++++ 22 23error[E0310]: the parameter type `T` may not live long enough 24 --> $DIR/regions-close-object-into-object-5.rs:17:5 25 | 26LL | Box::new(B(&*v)) as Box<dyn X> 27 | ^^^^^^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds 28 | 29help: consider adding an explicit lifetime bound... 30 | 31LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { 32 | +++++++++ 33 34error[E0515]: cannot return value referencing local data `*v` 35 --> $DIR/regions-close-object-into-object-5.rs:17:5 36 | 37LL | Box::new(B(&*v)) as Box<dyn X> 38 | ^^^^^^^^^^^---^^^^^^^^^^^^^^^^ 39 | | | 40 | | `*v` is borrowed here 41 | returns a value referencing data owned by the current function 42 43error[E0310]: the parameter type `T` may not live long enough 44 --> $DIR/regions-close-object-into-object-5.rs:17:14 45 | 46LL | Box::new(B(&*v)) as Box<dyn X> 47 | ^^^^^^ ...so that the type `T` will meet its required lifetime bounds 48 | 49help: consider adding an explicit lifetime bound... 50 | 51LL | fn f<'a, T: 'static, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { 52 | +++++++++ 53 54error: aborting due to 5 previous errors 55 56Some errors have detailed explanations: E0310, E0515. 57For more information about an error, try `rustc --explain E0310`.