about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-06-27 01:59:07 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-07-14 14:57:14 +0300
commite3acb341b2ff743e186c032326d24bfa8827bedc (patch)
treec7080793f49bb9c75752cee93830a5b49bf9d0e8 /src/libsyntax/parse/lexer
parent5987fe8f75c443d4f73603fa5a3af8ab41ee1b01 (diff)
downloadrust-e3acb341b2ff743e186c032326d24bfa8827bedc.tar.gz
rust-e3acb341b2ff743e186c032326d24bfa8827bedc.zip
Remove some tests using AST comparisons, fix other tests
Diffstat (limited to 'src/libsyntax/parse/lexer')
-rw-r--r--src/libsyntax/parse/lexer/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs
index 92fcf865042..bf790e6143a 100644
--- a/src/libsyntax/parse/lexer/mod.rs
+++ b/src/libsyntax/parse/lexer/mod.rs
@@ -1842,7 +1842,8 @@ mod tests {
                 tok: token::Ident(id, false),
                 sp: Span::new(BytePos(21), BytePos(23), NO_EXPANSION),
             };
-            assert_eq!(tok1, tok2);
+            assert_eq!(tok1.tok, tok2.tok);
+            assert_eq!(tok1.sp, tok2.sp);
             assert_eq!(string_reader.next_token().tok, token::Whitespace);
             // the 'main' id is already read:
             assert_eq!(string_reader.pos.clone(), BytePos(28));
@@ -1852,7 +1853,8 @@ mod tests {
                 tok: mk_ident("main"),
                 sp: Span::new(BytePos(24), BytePos(28), NO_EXPANSION),
             };
-            assert_eq!(tok3, tok4);
+            assert_eq!(tok3.tok, tok4.tok);
+            assert_eq!(tok3.sp, tok4.sp);
             // the lparen is already read:
             assert_eq!(string_reader.pos.clone(), BytePos(29))
         })