1 #![deny(single_use_lifetimes)]
3 #![allow(unused_variables)]
5 // Test that we DO warn when lifetime name is used only
6 // once in a fn argument.
9 a: for<'a> fn(&'a u32), //~ ERROR `'a` only used once
10 b: for<'a> fn(&'a u32, &'a u32), // OK, used twice.
11 c: for<'a> fn(&'a u32) -> &'a u32, // OK, used twice.
12 d: for<'a> fn() -> &'a u32, // OK, used only in return type.
13 //~^ ERROR return type references lifetime `'a`, which is not constrained by the fn input types