diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-17 09:35:26 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-20 14:46:30 +1000 |
| commit | f6637f3fcc01d7efe9a2e00f62d35a7e68ae892d (patch) | |
| tree | aa9c2ae41673a8c5ca44261cd2dec76465497343 /src/libsyntax | |
| parent | 128b4c8035fc788b78157d4e1975cda0f25ce599 (diff) | |
| download | rust-f6637f3fcc01d7efe9a2e00f62d35a7e68ae892d.tar.gz rust-f6637f3fcc01d7efe9a2e00f62d35a7e68ae892d.zip | |
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.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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<Symbol> 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 } } } |
