Open
Description
As can be seen in the example:
trait Trait {}
// Checked
fn foo() where i32 : Trait {}
// Not checked.
fn bar() where for<'a> fn(&'a ()) : Trait {}
In light of #2056 this will become just a lint, but still we should lint in both cases rather than just the first. This would be fixed by having well-formedness not ignore higher-ranked predicates. See #50815 for an attempted fix which resulted in too many regressions, probably for other bugs in handling higher-ranked stuff. We can try revisiting this after more chalkification.
Metadata
Metadata
Assignees
Labels
Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)Area: Trait systemCategory: An issue proposing an enhancement or a PR with one.Status: Being actively tracked by the types teamRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.