Skip to content

Commit

Permalink
libsyntax: restore lost error message
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Sep 7, 2015
1 parent c8da569 commit 0e96c28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libsyntax/parse/parser.rs
Expand Up @@ -4726,9 +4726,13 @@ impl<'a> Parser<'a> {
let fields = try!(self.parse_record_struct_body(&class_name));
(fields, None)
// Tuple-style struct definition with optional where-clause.
} else {
} else if self.token == token::OpenDelim(token::Paren) {
let fields = try!(self.parse_tuple_struct_body(&class_name, &mut generics));
(fields, Some(ast::DUMMY_NODE_ID))
} else {
let token_str = self.this_token_to_string();
return Err(self.fatal(&format!("expected `where`, `{}`, `(`, or `;` after struct \
name, found `{}`", "{", token_str)))
};

Ok((class_name,
Expand Down

0 comments on commit 0e96c28

Please sign in to comment.