Skip to content

Commit 5119597

Browse files
committed
hard to read the implied double negative
1 parent 3c10a94 commit 5119597

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libsyntax/parse/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,16 +2329,16 @@ pub impl Parser {
23292329
let binding_mode =
23302330
if refutable {bind_infer} else {bind_by_copy};
23312331

2332-
let cannot_be_enum_or_struct;
2332+
let can_be_enum_or_struct;
23332333
match self.look_ahead(1) {
23342334
token::LPAREN | token::LBRACKET | token::LT |
23352335
token::LBRACE | token::MOD_SEP =>
2336-
cannot_be_enum_or_struct = false,
2336+
can_be_enum_or_struct = true,
23372337
_ =>
2338-
cannot_be_enum_or_struct = true
2338+
can_be_enum_or_struct = false
23392339
}
23402340

2341-
if is_plain_ident(&*self.token) && cannot_be_enum_or_struct {
2341+
if is_plain_ident(&*self.token) && !can_be_enum_or_struct {
23422342
let name = self.parse_path_without_tps();
23432343
let sub;
23442344
if self.eat(&token::AT) {

0 commit comments

Comments
 (0)