diff options
| author | bors <bors@rust-lang.org> | 2018-07-14 16:22:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-14 16:22:19 +0000 |
| commit | 0db03e635a5e38ebc7635637b870b8fbcc8a7e46 (patch) | |
| tree | 44b2d1b1a644231eefcff62a9eb9018ab4d7d1c5 /src/libsyntax/parse/parser.rs | |
| parent | 1731f0af22af16c461b2b7abe58988b8549b2de6 (diff) | |
| parent | 7d142c1e53165fea78314117f59e13257d7bf85d (diff) | |
| download | rust-0db03e635a5e38ebc7635637b870b8fbcc8a7e46.tar.gz rust-0db03e635a5e38ebc7635637b870b8fbcc8a7e46.zip | |
Auto merge of #51829 - petrochenkov:noideq, r=eddyb
Remove most of `PartialEq` and `Hash` impls from AST and HIR structures Continuation of https://github.com/rust-lang/rust/pull/49326, prerequisite for removing `PartialEq` for `Ident`.
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..62bb5fbd04f 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_pub() && self.check_ident() && self.look_ahead(1, |t| *t != token::Not) { |
