From 78eb516dda4ed811bfb010f7a69e8eac0fe6ce80 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Fri, 16 Nov 2018 23:37:23 -0800 Subject: Ignore non-semantic tokens for 'probably_eq' streams. --- src/libsyntax/parse/token.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') 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 -- cgit 1.4.1-3-g733a5