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

Handle nested syn::Type:::Group #79

Merged
merged 2 commits into from
Jun 1, 2020

Commits on May 31, 2020

  1. Handle nested syn::Type:::Group

    Currently, rustc does not pass the exact original TokenStream to
    proc-macros in several cases. This has many undesirable effects, such as
    losing correct location information in error message.
    See rust-lang/rust#43081 for more details
    
    In the future, rustc will begin passing the correct TokenStream to
    proc-macros. As a result, `syn` may wrap a type in one or more
    `syn::Type::Group`s (if the proc-macro input came from a `macro_rules!` expansion).
    
    I've determined that this can cause `yaserde-derive` to fail to match
    a `Type::Path`. This PR should properly handle nested groups, allowing
    your crate to work with both old and new input.
    
    If you have any questions, feel free to ask me. See rust-lang/rust#72622
    for more details.
    Aaron1011 committed May 31, 2020
    Configuration menu
    Copy the full SHA
    6732d8b View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2020

  1. add module unit test

    MarcAntoine-Arnaud authored and Aaron1011 committed Jun 1, 2020
    Configuration menu
    Copy the full SHA
    340e75c View commit details
    Browse the repository at this point in the history