]> git.lizzy.rs Git - rust.git/blob - src/test/ui/single-use-lifetime/two-uses-in-fn-argument-and-return.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / 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() {}