Skip to content

docs: explain DSL macro invocation delimiters - #2045

Open
TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-1956-macro-invocation-delimiters
Open

TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-1956-macro-invocation-delimiters

Conversation

@TXyy2023

Copy link
Copy Markdown

Fixes #1956.

The DSL example uses stringify!{$e} without explaining why it has braces. Add a short note that the parenthesized and bracketed forms have the same effect here, and that calculate! accepts any of the three delimiter pairs regardless of its matcher. Also mention the trailing semicolon needed for parenthesized or bracketed statement invocations. The runnable example is unchanged.

Validation: mdbook test (197 chapters), the original example compiled and run, English/Japanese/Chinese/Spanish/Korean builds, and the official full-tree linkchecker for all five builds. Separately compiled three stringify! variants and six statement-delimiter/semicolon cases to verify the explanation against actual behavior, including the two expected syntax errors.

The wording follows the Rust Reference's macro invocation syntax and outer matcher delimiter rule.

AI assistance: Authored and validated with OpenAI Codex in a user-authorized contribution 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

@Kivooeo

Kivooeo commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

sorry but i think having llm generated documentation is unacceptable, we had bad stories in past about it, and i would be glad if we don't repeat ours mistakes from past

@TXyy2023

Copy link
Copy Markdown
Author

Understood. This PR was prepared with LLM assistance. I will not submit further automated documentation contributions to this repository.

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.3 DSL: Curly braces in macro invocation

4 participants