Skip to content

Macro Guide: Invocation syntax section doesn't describe fragment specifier used in introductory example #19554

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

Closed
cdouglass opened this issue Dec 5, 2014 · 1 comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

Comments

@cdouglass
Copy link

Section 2.0, describing invocation syntax, describes the fragment specifiers ident, expr, ty, pat, and block. It would be helpful if it mentioned path as well since that's used in the introductory example:

macro_rules! early_return(
    ($inp:expr $sp:path) => ( // invoke it like `(input_5 SpecialE)`
        match $inp {
            $sp(x) => { return x; }
            _ => {}
        }
    );
)
@kmcallister kmcallister added A-docs A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..) labels Dec 5, 2014
@kmcallister
Copy link
Contributor

That whole section has been re-written. I linked the complete list of fragment specifiers from the place where the "fragment specifier" concept is introduced.

lnicola added a commit to lnicola/rust that referenced this issue Apr 28, 2025
…e-children-modules-to-child-modules

internal: rename `children_modules` to `child_modules`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
Projects
None yet
Development

No branches or pull requests

3 participants