]> git.lizzy.rs Git - rust.git/blob - tests/ui/single-use-lifetime/two-uses-in-inherent-impl-header.rs
Auto merge of #106646 - Amanieu:ilp32-object, r=Mark-Simulacrum
[rust.git] / tests / 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() {}