Skip to content

docs: explain single-element tuples in DRY macro - #2046

Open
TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-1955-dry-tuple-explanation
Open

TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-1955-dry-tuple-explanation

Conversation

@TXyy2023

Copy link
Copy Markdown

The DRY example uses ($a.len(),) and ($b.len(),) in its assertion message without explaining the trailing commas. This adds a short note identifying the single-element tuples, showing their effect on the formatted lengths, and linking to the tuple and macro-repetition chapters. The runnable example is unchanged.

Fixes #1955.

Validation:

  • Compiled and ran the original example's three tests.
  • Verified the actual length-mismatch message with 2- and 3-element vectors; a scalar control confirms that the tuples affect formatting, while the assertion still compares lengths directly.
  • mdbook test (197 chapters), builds for English/Japanese/Chinese/Spanish/Korean, and the official Rust full-tree linkchecker for all five builds.
  • git diff --check; rendered prose and local links checked.

AI disclosure: This contribution was prepared and validated with OpenAI Codex in a user-authorized automation.

@rustbot

rustbot commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @marioidival (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @marioidival

@jieyouxu

Copy link
Copy Markdown
Member

Hi there,

This looks like an automated submission, which is not permitted.

We are thus suspending you as per our policies [1], [2] and contribution standards [3]. You can contact the moderation team to discuss and possibly reconsider your suspension.

Thanks for understanding.

Jieyou in the name of the mod team

This branch has not been deployed

No deployments
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.

Chapter 17.2: undescribed repetition pattern?

4 participants