diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-21 01:58:25 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-07-14 14:56:57 +0300 |
| commit | 4d1a30c92b50c5965ed26449758fca81bee15747 (patch) | |
| tree | ad1638de488e3f30ce91f7e7443b0b7891003a0b /src/libsyntax/parse/parser.rs | |
| parent | 0a8275f8b677304458c6161e26436dfe67ab766b (diff) | |
| download | rust-4d1a30c92b50c5965ed26449758fca81bee15747.tar.gz rust-4d1a30c92b50c5965ed26449758fca81bee15747.zip | |
Remove most of `PartialEq` impls from AST and HIR structures
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a1b78a23b8f..8bd4a7d71d7 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -95,13 +95,13 @@ pub enum PathStyle { Mod, } -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, PartialEq, Debug)] enum SemiColonMode { Break, Ignore, } -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, PartialEq, Debug)] enum BlockMode { Break, Ignore, @@ -376,7 +376,7 @@ impl TokenCursor { } } -#[derive(PartialEq, Eq, Clone)] +#[derive(Clone, PartialEq)] crate enum TokenType { Token(token::Token), Keyword(keywords::Keyword), @@ -522,7 +522,7 @@ fn dummy_arg(span: Span) -> Arg { Arg { ty: P(ty), pat: pat, id: ast::DUMMY_NODE_ID } } -#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Copy, Clone, Debug)] enum TokenExpectType { Expect, NoExpect, @@ -6999,7 +6999,7 @@ impl<'a> Parser<'a> { // Verify whether we have encountered a struct or method definition where the user forgot to // add the `struct` or `fn` keyword after writing `pub`: `pub S {}` - if visibility.node == VisibilityKind::Public && + if visibility.node.is_public() && self.check_ident() && self.look_ahead(1, |t| *t != token::Not) { |
