diff options
| author | John Clements <clements@racket-lang.org> | 2013-04-19 08:44:47 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2013-04-28 09:51:15 -0700 |
| commit | 5119597dc6549e21d62ce7bae7b7418b3f8bf56e (patch) | |
| tree | 1f44b05c0c2e66186a7302eca49b9f1e48ce858b /src/libsyntax/parse/parser.rs | |
| parent | 3c10a9412e2b1668bfe348f4728eedc2de0c642a (diff) | |
| download | rust-5119597dc6549e21d62ce7bae7b7418b3f8bf56e.tar.gz rust-5119597dc6549e21d62ce7bae7b7418b3f8bf56e.zip | |
hard to read the implied double negative
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index b0a400085b1..aa67bb23532 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2329,16 +2329,16 @@ pub impl Parser { let binding_mode = if refutable {bind_infer} else {bind_by_copy}; - let cannot_be_enum_or_struct; + let can_be_enum_or_struct; match self.look_ahead(1) { token::LPAREN | token::LBRACKET | token::LT | token::LBRACE | token::MOD_SEP => - cannot_be_enum_or_struct = false, + can_be_enum_or_struct = true, _ => - cannot_be_enum_or_struct = true + can_be_enum_or_struct = false } - if is_plain_ident(&*self.token) && cannot_be_enum_or_struct { + if is_plain_ident(&*self.token) && !can_be_enum_or_struct { let name = self.parse_path_without_tps(); let sub; if self.eat(&token::AT) { |
