Skip to content

Handle generic associated constants in const qualification for structural match  #73448

Closed
@ecstatic-morse

Description

@ecstatic-morse

#67343 started using const qualification for more precise structural match warnings. The idea is that const qualification should be strictly more precise than the current type visitor (search_for_structural_match_violation). However, const qualification is more conservative in the face of generic associated constants than the type visitor, which typically runs after substitution. This was the case in the example in #73431.

We will need to make const qualification handle all cases that search_for_structural_match_violation does before switching away from the latter.

Metadata

Metadata

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-patternsRelating to patterns and pattern matchingC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions