fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: lifetime may not live long enough 2 --> $DIR/issue-16922.rs:4:5 3 | 4LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> { 5 | - let's call the lifetime of this reference `'1` 6LL | Box::new(value) as Box<dyn Any> 7 | ^^^^^^^^^^^^^^^ cast requires that `'1` must outlive `'static` 8 | 9help: to declare that the trait object captures data from argument `value`, you can add an explicit `'_` lifetime bound 10 | 11LL | fn foo<T: Any>(value: &T) -> Box<dyn Any + '_> { 12 | ++++ 13 14error: aborting due to previous error 15