You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/patterns.md
+1
Original file line number
Diff line number
Diff line change
@@ -787,6 +787,7 @@ Furthermore we require that the value of `C` *has (recursive) structural equalit
787
787
- Nothing else has structural equality.
788
788
789
789
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.
790
791
791
792
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.
792
793
In particular, it fully participates in exhaustiveness checking.
0 commit comments