]> git.lizzy.rs Git - rust.git/blob - tests/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs
Auto merge of #107137 - Mark-Simulacrum:169, r=Mark-Simulacrum
[rust.git] / tests / ui / single-use-lifetime / two-uses-in-fn-argument-and-return.rs
1 // Test that we DO NOT warn when lifetime name is used in
2 // both the argument and return.
3 //
4 // check-pass
5
6 #![deny(single_use_lifetimes)]
7 #![allow(dead_code)]
8 #![allow(unused_variables)]
9
10 // OK: used twice
11 fn c<'a>(x: &'a u32) -> &'a u32 {
12     &22
13 }
14
15 fn main() {}