mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-23 19:43:20 +00:00
a586f52a0f
This should give us more UI coverage for free. It also removes the `run-pass` suite, so we now only have the `ui` suite.
20 lines
258 B
Rust
20 lines
258 B
Rust
#![deny(clippy::needless_lifetimes)]
|
|
#![allow(dead_code)]
|
|
|
|
trait Foo {}
|
|
|
|
struct Bar {}
|
|
|
|
struct Baz<'a> {
|
|
bar: &'a Bar,
|
|
}
|
|
|
|
impl<'a> Foo for Baz<'a> {}
|
|
|
|
impl Bar {
|
|
fn baz<'a>(&'a self) -> impl Foo + 'a {
|
|
Baz { bar: self }
|
|
}
|
|
}
|
|
|
|
fn main() {}
|