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

proc_macro: Stay on the "use the cache" path more #50069

Merged
merged 1 commit into from
Apr 20, 2018

Commits on Apr 19, 2018

  1. proc_macro: Stay on the "use the cache" path more

    Discovered in rust-lang#50061 we're falling off the "happy path" of using a stringified
    token stream more often than we should. This was due to the fact that a
    user-written token like `0xf` is equality-different from the stringified token
    of `15` (despite being semantically equivalent).
    
    This patch updates the call to `eq_unspanned` with an even more awful solution,
    `probably_equal_for_proc_macro`, which ignores the value of each token and
    basically only compares the structure of the token stream, assuming that the AST
    doesn't change just one token at a time.
    
    While this is a step towards fixing rust-lang#50061 there is still one regression
    from rust-lang#49154 which needs to be fixed.
    alexcrichton committed Apr 19, 2018
    Configuration menu
    Copy the full SHA
    e934873 View commit details
    Browse the repository at this point in the history