clippy 0.0.113

A bunch of helpful lints to avoid common pitfalls in Rust
1
2
3
4
5
6
7
8
9
10
11
#![feature(plugin)]
#![plugin(clippy)]

fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str { unimplemented!() }

fn main() {}

trait WithLifetime<'a> {}

// should not warn because it won't build without the lifetime
fn trait_obj_elided<'a>(_arg: &'a WithLifetime) -> &'a str { unimplemented!() }