Skip to content

Commit c6719b5

Browse files
authored
mention associated consts
1 parent 3fb728d commit c6719b5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/patterns.md

+1
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ Furthermore we require that the value of `C` *has (recursive) structural equalit
787787
- Nothing else has structural equality.
788788

789789
In particular, the value of `C` must be known at pattern-building time (which is pre-monomorphization).
790+
This means that associated consts cannot be used as patterns.
790791

791792
After ensuring all conditions are met, the constant value is translated into a pattern, and now behaves exactly as-if that pattern had been written directly.
792793
In particular, it fully participates in exhaustiveness checking.

0 commit comments

Comments
 (0)