diff options
| author | bors <bors@rust-lang.org> | 2020-09-02 03:19:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-02 03:19:38 +0000 |
| commit | b4acb110333392ecdaf890fce080e4b576106aae (patch) | |
| tree | b025ea8c490ac55356886220a1917e0e66242498 /compiler/rustc_parse/src/lib.rs | |
| parent | e36e4bd0f7e722d3c97d1ca45387e58f81e4e8ea (diff) | |
| parent | fabd8a68345270c053cce906e5f037e0cfe7b6ef (diff) | |
Auto merge of #76170 - matklad:notrivia, r=petrochenkov
Remove trivia tokens r? @ghost
Diffstat (limited to 'compiler/rustc_parse/src/lib.rs')
| -rw-r--r-- | compiler/rustc_parse/src/lib.rs | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs index bc857c97742..462279b0a9e 100644 --- a/compiler/rustc_parse/src/lib.rs +++ b/compiler/rustc_parse/src/lib.rs @@ -348,9 +348,6 @@ pub fn tokenstream_probably_equal_for_proc_macro( | token::CloseDelim(DelimToken::NoDelim) // The pretty printer collapses many semicolons into one. | token::Semi - // The pretty printer collapses whitespace arbitrarily and can - // introduce whitespace from `NoDelim`. - | token::Whitespace // The pretty printer can turn `$crate` into `::crate_name` | token::ModSep = token.kind { return false; @@ -506,8 +503,6 @@ fn token_probably_equal_for_proc_macro(first: &Token, other: &Token) -> bool { | (&Pound, &Pound) | (&Dollar, &Dollar) | (&Question, &Question) - | (&Whitespace, &Whitespace) - | (&Comment, &Comment) | (&Eof, &Eof) => true, (&BinOp(a), &BinOp(b)) | (&BinOpEq(a), &BinOpEq(b)) => a == b, @@ -516,8 +511,6 @@ fn token_probably_equal_for_proc_macro(first: &Token, other: &Token) -> bool { (&DocComment(a1, a2, a3), &DocComment(b1, b2, b3)) => a1 == b1 && a2 == b2 && a3 == b3, - (&Shebang(a), &Shebang(b)) => a == b, - (&Literal(a), &Literal(b)) => a == b, (&Lifetime(a), &Lifetime(b)) => a == b, |
