Skip to content

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Oct 3, 2025

matches #1813

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 3, 2025
@tshepang tshepang marked this pull request as draft October 4, 2025 17:37
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 4, 2025
@tshepang tshepang force-pushed the tuple-struct-extensions branch from 4306803 to 5acc59f Compare October 4, 2025 18:10
@tshepang tshepang marked this pull request as ready for review October 4, 2025 18:11
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 4, 2025
The example for the tuple enum variant constructor should go above the
example that already uses a tuple enum variant constructor in a nested
manner.  This also matches the order in the list of extending
expressions above -- the list items for tuple struct constructors and
tuple enum variant constructors come after tuple expressions and
before block expressions.

For demonstrating a tuple enum variant constructor, it's better to use
`Some(_)` than to define one; `Option<T>` is well known enough.

For the tuple struct that we need to define, let's use a short name
like `W<T>` here rather than `TupleStruct<T>` (and show its
definition).  When I see a name like `TupleStruct`, it takes me a
moment to confirm it's just a name and not more than that.  We use
this `W<T>(T)` "wrapper" tuple struct definition elsewhere in the
Reference.

As a wording matter, we say "argument to" rather than "argument of".

Similarly, something isn't an argument to a tuple struct but an
argument to the tuple struct constructor, so let's say that.
@traviscross
Copy link
Contributor

Thanks @tshepang. Made some revisions. See the commit message for details.

@traviscross traviscross added this pull request to the merge queue Oct 5, 2025
Merged via the queue into rust-lang:master with commit 3882474 Oct 5, 2025
5 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 5, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 7, 2025
Update books

## rust-lang/reference

4 commits in e11adf6016a362766eea5a3f9832e193994dd0c8..8efb9805686722dba511b7b27281bb6b77d32130
2025-10-06 15:04:20 UTC to 2025-10-01 17:30:01 UTC

- Clarify that "or it is dropped" is meant restrictively (rust-lang/reference#2035)
- add lifetime extension tests for tuple struct temporaries (rust-lang/reference#2033)
- Add `target_env = "macabi"` and `target_env = "sim"` (rust-lang/reference#1781)
- Typo fixes for the Tokens page (additions -> editions) (rust-lang/reference#2031)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 7, 2025
Update books

## rust-lang/reference

4 commits in e11adf6016a362766eea5a3f9832e193994dd0c8..8efb9805686722dba511b7b27281bb6b77d32130
2025-10-06 15:04:20 UTC to 2025-10-01 17:30:01 UTC

- Clarify that "or it is dropped" is meant restrictively (rust-lang/reference#2035)
- add lifetime extension tests for tuple struct temporaries (rust-lang/reference#2033)
- Add `target_env = "macabi"` and `target_env = "sim"` (rust-lang/reference#1781)
- Typo fixes for the Tokens page (additions -> editions) (rust-lang/reference#2031)
rust-timer added a commit to rust-lang/rust that referenced this pull request Oct 7, 2025
Rollup merge of #147407 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/reference

4 commits in e11adf6016a362766eea5a3f9832e193994dd0c8..8efb9805686722dba511b7b27281bb6b77d32130
2025-10-06 15:04:20 UTC to 2025-10-01 17:30:01 UTC

- Clarify that "or it is dropped" is meant restrictively (rust-lang/reference#2035)
- add lifetime extension tests for tuple struct temporaries (rust-lang/reference#2033)
- Add `target_env = "macabi"` and `target_env = "sim"` (rust-lang/reference#1781)
- Typo fixes for the Tokens page (additions -> editions) (rust-lang/reference#2031)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Oct 8, 2025
Update books

## rust-lang/reference

4 commits in e11adf6016a362766eea5a3f9832e193994dd0c8..8efb9805686722dba511b7b27281bb6b77d32130
2025-10-06 15:04:20 UTC to 2025-10-01 17:30:01 UTC

- Clarify that "or it is dropped" is meant restrictively (rust-lang/reference#2035)
- add lifetime extension tests for tuple struct temporaries (rust-lang/reference#2033)
- Add `target_env = "macabi"` and `target_env = "sim"` (rust-lang/reference#1781)
- Typo fixes for the Tokens page (additions -> editions) (rust-lang/reference#2031)
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