fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
455 B11 linesraw
1error[E0621]: explicit lifetime required in the type of `value`
2  --> $DIR/issue-16922.rs:4:5
3   |
4LL | fn foo<T: Any>(value: &T) -> Box<dyn Any> {
5   |                       -- help: add explicit lifetime `'static` to the type of `value`: `&'static T`
6LL |     Box::new(value) as Box<dyn Any>
7   |     ^^^^^^^^^^^^^^^ lifetime `'static` required
8
9error: aborting due to previous error
10
11For more information about this error, try `rustc --explain E0621`.