Skip to content

Commit 1ad3e9d

Browse files
committed
rfc, or-patterns: clarify unification semantics for p | q.
1 parent 151c8a6 commit 1ad3e9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

text/0000-or-patterns.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,11 @@ The particular design of such an error message is left open to implementations.
579579
+ the type of any two bindings with the same name in `p` and `q` do not unify
580580
with respect to types or binding modes.
581581

582+
[type coercions]: https://doc.rust-lang.org/reference/type-coercions.html
583+
584+
Unification of types is in all instances aforementioned exact and
585+
implicit [type coercions] do not apply.
586+
582587
2. When type checking an expression `match e_s { a_1 => e_1, ... a_n => e_n }`,
583588
for each match arm `a_i` which contains a pattern of form `p_i | q_i`,
584589
the pattern `p_i | q_i` is considered ill formed if,

0 commit comments

Comments
 (0)