fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1// run-rustfix 2 3// Test that we DO warn when lifetime name is not used at all. 4 5#![deny(unused_lifetimes)] 6#![allow(dead_code, unused_variables)] 7 8fn september() {} 9//~^ ERROR lifetime parameter `'a` never used 10//~| HELP elide the unused lifetime 11 12fn october<'b, T>(s: &'b T) -> &'b T { 13 //~^ ERROR lifetime parameter `'a` never used 14 //~| HELP elide the unused lifetime 15 s 16} 17 18fn november<'a>(s: &'a str) -> &'a str { 19 //~^ ERROR lifetime parameter `'b` never used 20 //~| HELP elide the unused lifetime 21 s 22} 23 24fn main() {}