libsyntax: error on struct Foo {}.
This commit is contained in:
parent
30b1957cd4
commit
09255dbe2d
4 changed files with 21 additions and 1 deletions
|
@ -3214,6 +3214,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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue