Disallow impl in match_first twice (#7493)

Prevent dead code by diagnosing putting the same `impl` in a
`match_first` block more than once.
This commit is contained in:
Dana Jansens
2026-07-13 21:58:06 +00:00
committed by GitHub
parent 3d71858386
commit 8ea32187d4
2 changed files with 74 additions and 1 deletions
+2 -1
View File
@@ -4786,7 +4786,8 @@ difference.
#### Prioritization rule
> **TODO:** Document the changes to prioritization adopted in
> [#5337: Interface extension and `final impl` update](/proposals/p005337-interface-extension-and-final-impl-update.md).
> [#5337: Interface extension and `final impl` update](/proposals/p005337-interface-extension-and-final-impl-update.md) and
> [#7493: Disallow impl in match_first twice](/proposals/p007493-disallow-impl-in-match-first-twice.md).
Since at most one library can contain `impl` definitions with a given type
structure, all `impl` definitions with a given type structure must be in the