Skip to content

Conversation

@kirtchev-adacore
Copy link
Contributor

A small discrepancy in the definition of or-patterns was discovered during the rust-lang/fls meeting on 2025-12-12 involving Eric Huss and TC - or-patterns must not be used in function and closure parameters, as opposed to function and closure arguments as stated in the text. Function and closure parameters are the constructs carrying PatternNoTopAlts.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 15, 2025
A small discrepancy in the definition of `or-patterns` was discovered during
the `rust-lang/fls` meeting on 2025-12-12 involving Eric Huss and TC -
`or-patterns` must not be used in function and closure **parameters**, as
opposed to function and closure arguments as stated in the text. Function and
closure parameters are the constructs carrying `PatternNoTopAlt`s.
@kirtchev-adacore kirtchev-adacore force-pushed the pr/fix-or-pattern-definition branch from 238402c to ade7a62 Compare December 15, 2025 09:42
@kirtchev-adacore kirtchev-adacore changed the title Fix definition of or-patterns Fix restrictions of or-patterns Dec 15, 2025
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue Dec 15, 2025
Merged via the queue into rust-lang:master with commit 8272d65 Dec 15, 2025
5 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 15, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 16, 2025
Update books

## rust-lang/nomicon

1 commits in 9fe8fa599ad228dda74f240cc32b54bc5c1aa3e6..5b3a9d084cbc64e54da87e3eec7c7faae0e48ba9
2025-12-12 12:24:05 UTC to 2025-12-12 12:24:05 UTC

- Update method lookup link in dot-operator.md (rust-lang/nomicon#513)

## rust-lang/reference

4 commits in 50c5de90487b68d429a30cc9466dc8f5b410128f..ec78de0ffe2f8344bd0e222b17ac7a7d32dc7a26
2025-12-15 16:17:43 UTC to 2025-12-15 16:15:06 UTC

- tokens: clarify in escape tables that digits are hex (rust-lang/reference#2105)
- tokens: remove misplaced ".token." within a word (rust-lang/reference#2106)
- macros-by-example: add space in `macro.decl.repetition.fragment` example (rust-lang/reference#2107)
- Fix restrictions of or-patterns (rust-lang/reference#2108)
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 16, 2025
Update books

## rust-lang/nomicon

1 commits in 9fe8fa599ad228dda74f240cc32b54bc5c1aa3e6..5b3a9d084cbc64e54da87e3eec7c7faae0e48ba9
2025-12-12 12:24:05 UTC to 2025-12-12 12:24:05 UTC

- Update method lookup link in dot-operator.md (rust-lang/nomicon#513)

## rust-lang/reference

4 commits in 50c5de90487b68d429a30cc9466dc8f5b410128f..ec78de0ffe2f8344bd0e222b17ac7a7d32dc7a26
2025-12-15 16:17:43 UTC to 2025-12-15 16:15:06 UTC

- tokens: clarify in escape tables that digits are hex (rust-lang/reference#2105)
- tokens: remove misplaced ".token." within a word (rust-lang/reference#2106)
- macros-by-example: add space in `macro.decl.repetition.fragment` example (rust-lang/reference#2107)
- Fix restrictions of or-patterns (rust-lang/reference#2108)
rust-timer added a commit to rust-lang/rust that referenced this pull request Dec 16, 2025
Rollup merge of #150029 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/nomicon

1 commits in 9fe8fa599ad228dda74f240cc32b54bc5c1aa3e6..5b3a9d084cbc64e54da87e3eec7c7faae0e48ba9
2025-12-12 12:24:05 UTC to 2025-12-12 12:24:05 UTC

- Update method lookup link in dot-operator.md (rust-lang/nomicon#513)

## rust-lang/reference

4 commits in 50c5de90487b68d429a30cc9466dc8f5b410128f..ec78de0ffe2f8344bd0e222b17ac7a7d32dc7a26
2025-12-15 16:17:43 UTC to 2025-12-15 16:15:06 UTC

- tokens: clarify in escape tables that digits are hex (rust-lang/reference#2105)
- tokens: remove misplaced ".token." within a word (rust-lang/reference#2106)
- macros-by-example: add space in `macro.decl.repetition.fragment` example (rust-lang/reference#2107)
- Fix restrictions of or-patterns (rust-lang/reference#2108)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants