Static rustc_lint::builtin::ELIDED_LIFETIMES_IN_PATHS

source ·
pub static ELIDED_LIFETIMES_IN_PATHS: &'static Lint
Expand description

The elided_lifetimes_in_paths lint detects the use of hidden lifetime parameters.


struct Foo<'a> {
    x: &'a u32

fn foo(x: &Foo) {



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.