-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document pattern syntax and semantics #2853
Conversation
Pretty much a raw cut-and-paste, to make subsequent edits easier to see. There are some structural changes a the beginning and end, though.
Also add references and alternatives-considered.
FYI: commit f0f454a is almost a raw cut-and-paste from p2188.md, with some edits at the beginning and end, so you can use that as a diff base to see the edits I made to that content. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for separating the proposal text from the edits; that made the review much easier :)
Some relatively minor comments, but I think this is fine to land as-is and iterate from there if needed.
docs/design/pattern_matching.md
Outdated
As specified in | ||
[#2022](/proposals/p2022.md#the-behavior-of-unused-name-bindings), the `unused` | ||
keyword indicates that the binding is intended to not be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include some text like this from #2022 describing what unused
does:
Names that are qualified with the
unused
keyword are visible for name lookup
but uses are invalid, including when they cause ambiguous name lookup errors. If
attempted to be used, a compiler error will be shown to the user, instructing
them to either remove theunused
qualifier or remove the use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is still unresolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, missed that. Done.
Co-authored-by: Richard Smith <[email protected]>
Integrates the content of #2188 into
pattern_matching.md
Closes #2852