1 error[E0621]: explicit lifetime required in the type of `v`
2 --> $DIR/region-object-lifetime-in-coercion.rs:18:12
4 LL | fn a(v: &[u8]) -> Box<Foo + 'static> {
5 | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
6 LL | let x: Box<Foo + 'static> = Box::new(v);
7 | ^^^^^^^^^^^^^^^^^^ lifetime `'static` required
9 error[E0621]: explicit lifetime required in the type of `v`
10 --> $DIR/region-object-lifetime-in-coercion.rs:24:5
12 LL | fn b(v: &[u8]) -> Box<Foo + 'static> {
13 | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
15 | ^^^^^^^^^^^ lifetime `'static` required
17 error[E0621]: explicit lifetime required in the type of `v`
18 --> $DIR/region-object-lifetime-in-coercion.rs:31:5
20 LL | fn c(v: &[u8]) -> Box<Foo> {
21 | ----- help: add explicit lifetime `'static` to the type of `v`: `&'static [u8]`
24 | ^^^^^^^^^^^ lifetime `'static` required
26 error: unsatisfied lifetime constraints
27 --> $DIR/region-object-lifetime-in-coercion.rs:36:5
29 LL | fn d<'a,'b>(v: &'a [u8]) -> Box<Foo+'b> {
30 | -- -- lifetime `'b` defined here
32 | lifetime `'a` defined here
34 | ^^^^^^^^^^^ returning this value requires that `'a` must outlive `'b`
36 error: aborting due to 4 previous errors
38 For more information about this error, try `rustc --explain E0621`.