Skip to content
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

Rework range pattern rules #1756

Merged
merged 7 commits into from
Mar 18, 2025

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Mar 12, 2025

This includes a series of commits which make some fixes to the range pattern rules and grammar, including a start from #1746. There were a few errors in the current description, and in general I found it a little confusing, so I reworked it a little to use consistent terminology and to describe the different range patterns individually.

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Mar 12, 2025
@ehuss ehuss force-pushed the range-to-exclusive-pattern branch 3 times, most recently from 4ad6290 to bccdd8d Compare March 18, 2025 22:17
I was not particularly happy with how these were being presented, as I
found it a bit confusing how it was combining some of the ranges, and
some of the terminology it was using.

I've shifted it so that it describes each of the five range kinds
separately, using the same terminology from std (and the grammar).

This also just has some slight wording tweaks for clarity.
@ehuss ehuss force-pushed the range-to-exclusive-pattern branch from bccdd8d to daa1992 Compare March 18, 2025 22:30
@traviscross traviscross added this pull request to the merge queue Mar 18, 2025
Merged via the queue into rust-lang:master with commit 9e24743 Mar 18, 2025
5 checks passed
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 24, 2025
Update books

## rust-lang/book

23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70
2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC

- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297)
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295)
- Ch. 01: Show how to work offline (rust-lang/book#4294)
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293)
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292)
- Anchors on listings (rust-lang/book#4271)
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288)
- Ch. 20: correct listing number (rust-lang/book#4287)
- Ch. 10.3: clarify language detail (rust-lang/book#4284)
- Ch. 17: minor typos and link reference (rust-lang/book#4286)
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282)
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281)
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165)
- Ch 10.1 minor clarifications (rust-lang/book#4256)
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232)
- Ferris: always show, even when it’s small (rust-lang/book#4280)
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279)
- Persist printing error, NOT ErrorKind (rust-lang/book#4259)
- Typo: "2" should be "2 seconds" (rust-lang/book#4263)
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270)
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261)
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273)
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272)

## rust-lang/reference

5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f
2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC

- Fix diagnostic attribute typo (rust-lang/reference#1767)
- Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761)
- Rework range pattern rules (rust-lang/reference#1756)
- Use warning block in behavior-considered-undefined (rust-lang/reference#1759)
- Add reference for asm-goto (rust-lang/reference#1693)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2025
Rollup merge of rust-lang#138894 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70
2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC

- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297)
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295)
- Ch. 01: Show how to work offline (rust-lang/book#4294)
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293)
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292)
- Anchors on listings (rust-lang/book#4271)
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288)
- Ch. 20: correct listing number (rust-lang/book#4287)
- Ch. 10.3: clarify language detail (rust-lang/book#4284)
- Ch. 17: minor typos and link reference (rust-lang/book#4286)
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282)
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281)
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165)
- Ch 10.1 minor clarifications (rust-lang/book#4256)
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232)
- Ferris: always show, even when it’s small (rust-lang/book#4280)
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279)
- Persist printing error, NOT ErrorKind (rust-lang/book#4259)
- Typo: "2" should be "2 seconds" (rust-lang/book#4263)
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270)
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261)
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273)
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272)

## rust-lang/reference

5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f
2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC

- Fix diagnostic attribute typo (rust-lang/reference#1767)
- Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761)
- Rework range pattern rules (rust-lang/reference#1756)
- Use warning block in behavior-considered-undefined (rust-lang/reference#1759)
- Add reference for asm-goto (rust-lang/reference#1693)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants