Closed
Description
warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> src/librustc_infer/traits/error_reporting/mod.rs:995:1
|
995 | / pub fn recursive_type_with_infinite_size_error(
996 | | tcx: TyCtxt<'tcx>,
997 | | type_def_id: DefId,
998 | | ) -> DiagnosticBuilder<'tcx> {
... |
1015 | | err
1016 | | }
| |_^
|
= note: `#[warn(clippy::needless_lifetimes)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
The generated preview spans the entire function, is this actually necessary?
Could we skip the function body and only show the signature that contains the lifetimes?
Or perhaps limit the span to the function return type instead of the end of the function?:
--> src/librustc_infer/traits/error_reporting/mod.rs:995:1
|
995 | / pub fn recursive_type_with_infinite_size_error(
996 | | tcx: TyCtxt<'tcx>,
997 | | type_def_id: DefId,
998 | | ) -> DiagnosticBuilder<'tcx> {
... | |______________________________^
|
= note: `#[warn(clippy::needless_lifetimes)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes