Closed
Description
struct Inv<'a>(&'a mut &'a ());
trait Trait {}
impl Trait for (for<'a> fn(Inv<'a>),) {}
fn with_bound()
where
((for<'a> fn(Inv<'a>)),): Trait,
{}
fn main() {
with_bound();
}
This should lint as the parens around the function pointer are unnecessary, but stopped doing so due to #104796.
Expected output:
warning: unnecessary parentheses around type
--> src/main.rs:9:5
|
9 | (for<'a> fn(Inv<'a>)): Trait,
| ^ ^
|
= note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
|
9 - (for<'a> fn(Inv<'a>)): Trait,
9 + for<'a> fn(Inv<'a>): Trait,
|