From 5119597dc6549e21d62ce7bae7b7418b3f8bf56e Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 19 Apr 2013 08:44:47 -0700 Subject: [PATCH] hard to read the implied double negative --- src/libsyntax/parse/parser.rs | 8 ++++---- 1 file 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) {