From f6637f3fcc01d7efe9a2e00f62d35a7e68ae892d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 17 May 2019 09:35:26 +1000 Subject: Move `is_gensymed` from `Symbol` to `Ident`. Note that the `is_gensymed` call on `primitive_types` is unnecessary because that table only contains the name of primitive types (e.g. `i32`) and never contains gensyms. --- src/libsyntax/ast.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index d12240655e6..88c22085bc4 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -72,11 +72,7 @@ pub struct Path { impl PartialEq for Path { fn eq(&self, symbol: &Symbol) -> bool { self.segments.len() == 1 && { - let name = self.segments[0].ident.name; - // Make sure these symbols are pure strings - debug_assert!(!symbol.is_gensymed()); - debug_assert!(!name.is_gensymed()); - name == *symbol + self.segments[0].ident.name == *symbol } } } -- cgit 1.4.1-3-g733a5