2 Checks for lifetime annotations which can be removed by
3 relying on lifetime elision.
6 The additional lifetimes make the code look more
7 complicated, while there is nothing out of the ordinary going on. Removing
8 them leads to more readable code.
11 - We bail out if the function has a `where` clause where lifetimes
12 are mentioned due to potential false positives.
13 - Lifetime bounds such as `impl Foo + 'a` and `T: 'a` must be elided with the
14 placeholder notation `'_` because the fully elided notation leaves the type bound to `'static`.
18 // Unnecessary lifetime annotations
19 fn in_and_out<'a>(x: &'a u8, y: u8) -> &'a u8 {
26 fn elided(x: &u8, y: u8) -> &u8 {