Static rustc_ap_rustc_lint_defs::builtin::ELIDED_LIFETIMES_IN_PATHS [−][src]
pub static ELIDED_LIFETIMES_IN_PATHS: &Lint
Expand description
The elided_lifetimes_in_paths
lint detects the use of hidden
lifetime parameters.
Example
ⓘ
#![deny(elided_lifetimes_in_paths)] struct Foo<'a> { x: &'a u32 } fn foo(x: &Foo) { }
{{produces}}
Explanation
Elided lifetime parameters can make it difficult to see at a glance
that borrowing is occurring. This lint ensures that lifetime
parameters are always explicitly stated, even if it is the '_
placeholder lifetime.
This lint is “allow” by default because it has some known issues, and may require a significant transition for old code.