| warning: not reporting region error due to nll |
| --> $DIR/issue-16922.rs:14:14 |
| | |
| LL | Box::new(value) as Box<Any> |
| | ^^^^^ |
| |
| error[E0621]: explicit lifetime required in the type of `value` |
| --> $DIR/issue-16922.rs:14:5 |
| | |
| LL | fn foo<T: Any>(value: &T) -> Box<Any> { |
| | -- help: add explicit lifetime `'static` to the type of `value`: `&'static T` |
| LL | Box::new(value) as Box<Any> |
| | ^^^^^^^^^^^^^^^ lifetime `'static` required |
| |
| error: aborting due to previous error |
| |
| For more information about this error, try `rustc --explain E0621`. |