Skip to content

Commit

Permalink
Add FIXME for using 'parse_delim_comma_seq' when parsing enum variants
Browse files Browse the repository at this point in the history
  • Loading branch information
VirrageS committed Nov 23, 2019
1 parent bbd0d9b commit 9300c3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_parse/parser/item.rs
Expand Up @@ -1337,6 +1337,8 @@ impl<'a> Parser<'a> {
/// Parses the part of an enum declaration following the `{`.
fn parse_enum_def(&mut self, _generics: &Generics) -> PResult<'a, EnumDef> {
let mut variants = Vec::new();
// FIXME: Consider using `parse_delim_comma_seq`.
// We could then remove eating comma in `recover_nested_adt_item`.
while self.token != token::CloseDelim(token::Brace) {
let variant_attrs = self.parse_outer_attributes()?;
let vlo = self.token.span;
Expand Down

0 comments on commit 9300c3b

Please sign in to comment.