Add lint for unused lifetimes

A step towards  #12805.
Why is this overloaded?