Skip to content

Commit f18e390

Browse files
committed
Fix an error in the unit-like pattern match example
Single-segment identifiers are bindings and don't work to match against a Unit struct.
1 parent 1ffeb23 commit f18e390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/attributes/type_system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Because a tuple enum variant's constructor's [visibility] is reduced to be no gr
156156
> // Cannot match a non-exhaustive unit-like or tuple struct except by using
157157
> // braced struct syntax with a wildcard.
158158
> // This would compile as `let Token { .. } = token;`
159-
> let Token = token;
159+
> let upstream::Token = token;
160160
> // This would compile as `let Id { 0: id_number, .. } = id;`
161161
> let Id(id_number) = id;
162162
>

0 commit comments

Comments
 (0)