]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-16922.stderr
Rollup merge of #52453 - srijs:fix-52436, r=TimNN
[rust.git] / src / test / ui / issues / issue-16922.stderr
1 error[E0621]: explicit lifetime required in the type of `value`
2   --> $DIR/issue-16922.rs:14:5
3    |
4 LL | fn foo<T: Any>(value: &T) -> Box<Any> {
5    |                       -- help: add explicit lifetime `'static` to the type of `value`: `&'static T`
6 LL |     Box::new(value) as Box<Any>
7    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'static` required
8
9 error: aborting due to previous error
10
11 For more information about this error, try `rustc --explain E0621`.