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/attributes/type_system.md
+2-7Lines changed: 2 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,13 +131,8 @@ let message = Message::Quit;
131
131
r[attributes.type-system.non_exhaustive.match]
132
132
There are limitations when matching on non-exhaustive types outside of the defining crate:
133
133
134
-
- When pattern matching on a non-exhaustive variant ([`struct`][struct] or [`enum` variant][enum]),
135
-
a [StructPattern] must be used which must include a `..`. A tuple enum variant's constructor's
136
-
[visibility] is reduced to be no greater than `pub(crate)`.
137
-
- When pattern matching on a non-exhaustive [`enum`][enum], matching on a variant does not
138
-
contribute towards the exhaustiveness of the arms.
139
-
140
-
The following examples of matching do not compile when outside the defining crate:
134
+
- When pattern matching on a non-exhaustive variant ([`struct`][struct] or [`enum` variant][enum]), a [StructPattern] must be used which must include a `..`. A tuple enum variant's constructor's [visibility] is reduced to be no greater than `pub(crate)`.
135
+
- When pattern matching on a non-exhaustive [`enum`][enum], matching on a variant does not contribute towards the exhaustiveness of the arms.The following examples of matching do not compile when outside the defining crate:
0 commit comments