-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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,
|
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.