1
Fork 0

auto merge of #5596 : luqmana/rust/unit-struct, r=catamorphism

Fixes #5449.
This commit is contained in:
bors 2013-03-28 06:12:47 -07:00
commit 09dc38eda5
4 changed files with 21 additions and 1 deletions

View file

@ -3207,6 +3207,10 @@ pub impl Parser {
}
}
}
if fields.len() == 0 {
self.fatal(fmt!("Unit-like struct should be written as: struct %s;",
*self.interner.get(class_name)));
}
self.bump();
} else if *self.token == token::LPAREN {
// It's a tuple-like struct.