Closed
Description
Repro (on 1.28-stable to 1.31-nightly)
#![warn(single_use_lifetimes)]
pub trait Tfv<'a>: Sized {
const FOO: &'a u8;
}
pub fn g<T: for<'a> Tfv<'a>>() {}
Unexpected lint result:
warning: lifetime parameter `'a` only used once
--> src/lib.rs:7:17
|
7 | pub fn g<T: for<'a> Tfv<'a>>() {}
| ^^ -- ...is used only here
| |
| this lifetime...
|
Unless we intend to support T: Tfv<'_>
, there shouldn't be a lint here. cc #44752.