]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/needless_lifetimes_impl_trait.rs
Removed stable feature flags
[rust.git] / tests / run-pass / needless_lifetimes_impl_trait.rs
1
2 #![deny(needless_lifetimes)]
3 #![allow(dead_code)]
4
5 trait Foo {}
6
7 struct Bar {}
8
9 struct Baz<'a> {
10     bar: &'a Bar,
11 }
12
13 impl<'a> Foo for Baz<'a> {}
14
15 impl Bar {
16     fn baz<'a>(&'a self) -> impl Foo + 'a {
17         Baz { bar: self }
18     }
19 }
20
21 fn main() {}