]> git.lizzy.rs Git - rust.git/blob - src/test/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / single-use-lifetime / two-uses-in-inherent-impl-header.rs
1 // Test that we DO NOT warn for a lifetime used twice in an impl.
2 //
3 // check-pass
4
5 #![deny(single_use_lifetimes)]
6 #![allow(dead_code)]
7 #![allow(unused_variables)]
8
9 struct Foo<'f> {
10     data: &'f u32,
11 }
12
13 impl<'f> Foo<'f> {
14     fn inherent_a(&self, data: &'f u32) {}
15 }
16
17 fn main() {}