From 6a42b0b28db4c18fd9e0c0e6e69ecbe0c5d9b107 Mon Sep 17 00:00:00 2001 From: Caio Date: Tue, 13 Aug 2019 21:40:21 -0300 Subject: Merge Variant and Variant_ --- src/libsyntax/parse/parser/item.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse/parser') diff --git a/src/libsyntax/parse/parser/item.rs b/src/libsyntax/parse/parser/item.rs index e85ef9cc974..60873ecb134 100644 --- a/src/libsyntax/parse/parser/item.rs +++ b/src/libsyntax/parse/parser/item.rs @@ -1564,14 +1564,15 @@ impl<'a> Parser<'a> { None }; - let vr = ast::Variant_ { + let vr = ast::Variant { ident, id: ast::DUMMY_NODE_ID, attrs: variant_attrs, data: struct_def, disr_expr, + span: vlo.to(self.prev_span), }; - variants.push(respan(vlo.to(self.prev_span), vr)); + variants.push(vr); if !self.eat(&token::Comma) { if self.token.is_ident() && !self.token.is_reserved_ident() { -- cgit 1.4.1-3-g733a5