diff options
| author | bors <bors@rust-lang.org> | 2018-11-19 19:57:02 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-11-19 19:57:02 +0000 |
| commit | 5aff30734b0e1056b1003459fbb27af199f51822 (patch) | |
| tree | ba9f47d46aff01bfadf71306ba83ee122ab3ca97 /src/libsyntax/parse | |
| parent | 39852cae2b7486a7fb15a90866b9ad0b7bb7615d (diff) | |
| parent | 78eb516dda4ed811bfb010f7a69e8eac0fe6ce80 (diff) | |
| download | rust-5aff30734b0e1056b1003459fbb27af199f51822.tar.gz rust-5aff30734b0e1056b1003459fbb27af199f51822.zip | |
Auto merge of #55971 - SergioBenitez:skip-non-semantic, r=alexcrichton
Ignore non-semantic tokens for 'probably_eq' streams. Improves the situation in #43081 by skipping typically non-semantic tokens when checking for 'probably_eq'. r? @alexcrichton
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 1c6fc1ac185..46fc6454d1c 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -570,8 +570,9 @@ impl Token { // // Instead the "probably equal" check here is "does each token // recursively have the same discriminant?" We basically don't look at - // the token values here and assume that such fine grained modifications - // of token streams doesn't happen. + // the token values here and assume that such fine grained token stream + // modifications, including adding/removing typically non-semantic + // tokens such as extra braces and commas, don't happen. if let Some(tokens) = tokens { if tokens.probably_equal_for_proc_macro(&tokens_for_real) { return tokens |
