Add FIXME for using 'parse_delim_comma_seq' when parsing enum variants

This commit is contained in:
Janusz Marcinkiewicz 2019-11-23 04:21:21 +01:00
parent bbd0d9bea0
commit 9300c3b6ad

View file

@ -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;