Ignore non-semantic tokens for 'probably_eq' streams.
This commit is contained in:
parent
4ec0ba9545
commit
78eb516dda
5 changed files with 141 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue