Skip to content
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

Allow lifetimes to be passed to macros #33135

Closed
wants to merge 2 commits into from

Commits on Apr 21, 2016

  1. Allow lifetimes to be passed to macros

    Partially fixes rust-lang#10413. This only handles lifetimes, as they're much
    more "obvious" than the type parameter list would be, as that implies
    that we probably want to mirror `ast::Generics` as well as all of the
    individual pieces. That should probably have an RFC.
    
    These are essentially just treated the same as idents. They're a single
    token, and are quite pervasive, so we interpolate them back into a real
    token rather than handling `NtLifetime` all over the parser.
    
    This change is specifically needed in Diesel in order for us to provide
    a "normal macro" alternative to some of our syntax extensions. With this
    change, we'd be able to have a decent stable story without syntex.
    sgrif committed Apr 21, 2016
    Configuration menu
    Copy the full SHA
    c1ffe04 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2016

  1. Implement ToTokens for ast::Lifetime

    All of the other non-terminals have this implementation. If we allow
    them in macros, we should allow them in quoting
    sgrif committed Apr 23, 2016
    Configuration menu
    Copy the full SHA
    711c3b5 View commit details
    Browse the repository at this point in the history