Skip to content

Relabel grammarRailroad-Button - #1798

Merged
ehuss merged 1 commit into
rust-lang:masterfrom
lukaslueg:relabel
Apr 22, 2025
Merged

Relabel grammarRailroad-Button#1798
ehuss merged 1 commit into
rust-lang:masterfrom
lukaslueg:relabel

Conversation

@lukaslueg

Copy link
Copy Markdown
Contributor

I suggest to relabel the button, and use the term "syntax diagram" instead of "railroad". The term "railroad" has no meaning to most readers.


On a different topic: Some of the diagrams can be simplified quite a bit. See the example below, which somewhat makes the written grammar more compact, but is to the benefit of the visual representation. Would you like a PR?

diff --git a/src/visibility-and-privacy.md b/src/visibility-and-privacy.md
index 847d469..e5469be 100644
--- a/src/visibility-and-privacy.md+++ b/src/visibility-and-privacy.md@@ -4,11 +4,7 @@ r[vis]
r[vis.syntax]
```grammar,items
Visibility ->
- `pub`- | `pub` `(` `crate` `)`- | `pub` `(` `self` `)`- | `pub` `(` `super` `)`- | `pub` `(` `in` SimplePath `)`+ `pub` ( `(` (`crate` | `self` | `super` | (`in` SimplePath)) `)` )?
ab

@rustbotrustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Apr 19, 2025

@ehussehuss left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, seems reasonable! I also pushed some changes to change the documentation, and to adjust the styling so the text doesn't wrap.

@ehuss
ehuss enabled auto-merge April 22, 2025 15:23
@ehuss
ehuss added this pull request to the merge queueApr 22, 2025
Merged via the queue into rust-lang:master with commit f606493Apr 22, 2025
@lukaslueg
lukaslueg deleted the relabel branch April 22, 2025 16:25
@lukaslueglukaslueg mentioned this pull request Apr 29, 2025
@rustbotrustbot mentioned this pull request May 5, 2025
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request May 5, 2025
Update books
## rust-lang/reference
9 commits in 3bf3402aea982b876eb56c87da17b0685c6461d5..387392674d74656f7cb437c05a96f0c52ea8e601
2025-05-03 21:29:09 UTC to 2025-04-22 15:25:03 UTC
- Document `let_chains` again (rust-lang/reference#1740)
- Add: orphan rule rationale. (rust-lang/reference#1755)
- Remove apologies about the Reference (rust-lang/reference#1792)
- Clean up some inline assembly examples (rust-lang/reference#1804)
- Remove StructExprTuple and StructExprUnit (rust-lang/reference#1803)
- Improve documentation of struct expressions (rust-lang/reference#1799)
- Clarify interaction of asm-goto with IBT (rust-lang/reference#1790)
- naked functions (rust-lang/reference#1689)
- Relabel grammarRailroad-Button (rust-lang/reference#1798)
## rust-lang/rust-by-example
3 commits in 0d7964d5b22cf920237ef1282d869564b4883b88..8a8918c698534547fa8a1a693cb3e7277f0bfb2f
2025-04-30 12:20:49 UTC to 2025-04-22 17:42:30 UTC
- The example is not meant to be compiled. Changed the code block ann… (rust-lang/rust-by-example#1926)
- Non-tail recursive call note in testcase_linked_list.md (rust-lang/rust-by-example#1924)
- docs: mark illustrative 'static lifetime example with `ignore` (rust-lang/rust-by-example#1923)
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 6, 2025
Rollup merge of rust-lang#140676 - rustbot:docs-update, r=ehuss
Update books
## rust-lang/reference
9 commits in 3bf3402aea982b876eb56c87da17b0685c6461d5..387392674d74656f7cb437c05a96f0c52ea8e601
2025-05-03 21:29:09 UTC to 2025-04-22 15:25:03 UTC
- Document `let_chains` again (rust-lang/reference#1740)
- Add: orphan rule rationale. (rust-lang/reference#1755)
- Remove apologies about the Reference (rust-lang/reference#1792)
- Clean up some inline assembly examples (rust-lang/reference#1804)
- Remove StructExprTuple and StructExprUnit (rust-lang/reference#1803)
- Improve documentation of struct expressions (rust-lang/reference#1799)
- Clarify interaction of asm-goto with IBT (rust-lang/reference#1790)
- naked functions (rust-lang/reference#1689)
- Relabel grammarRailroad-Button (rust-lang/reference#1798)
## rust-lang/rust-by-example
3 commits in 0d7964d5b22cf920237ef1282d869564b4883b88..8a8918c698534547fa8a1a693cb3e7277f0bfb2f
2025-04-30 12:20:49 UTC to 2025-04-22 17:42:30 UTC
- The example is not meant to be compiled. Changed the code block ann… (rust-lang/rust-by-example#1926)
- Non-tail recursive call note in testcase_linked_list.md (rust-lang/rust-by-example#1924)
- docs: mark illustrative 'static lifetime example with `ignore` (rust-lang/rust-by-example#1923)
@ehussehuss added this to the 1.88.0 milestone Jun 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-reviewStatus: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lukaslueg@ehuss@rustbot