#![warn(unused)] #![deny(warnings)] struct Inv<'a>(&'a mut &'a ()); trait Trait<'a> {} impl<'b> Trait<'b> for for<'a> fn(Inv<'a>) {} fn with_bound() where for<'b> (for<'a> fn(Inv<'a>)): Trait<'b>, //~ ERROR unnecessary parentheses around type {} trait Hello {} fn with_dyn_bound() where (dyn Hello<(for<'b> fn(&'b ()))>): Hello //~ ERROR unnecessary parentheses around type {} fn main() { with_bound(); with_dyn_bound(); }