【发布时间】:2021-02-12 12:13:59
【问题描述】:
warning: hidden lifetime parameters in types are deprecated
--> asd/src/app/qwe.rs:88:45
|
88 | fn add_meta_from_args(&mut self, args: &ArgMatches) -> AppRun {
| ^^^^^^^^^^- help: indicate the anonymous lifetime: `<'_>`
我应该在哪里指定这个匿名生命周期?我也不是很了解它的必要性。如果参数是借用的,为什么还需要一个生命周期?
【问题讨论】:
标签: rust reference lifetime borrow-checker borrowing