1
Fork 0

Move span into StructField

This commit is contained in:
Vadim Petrochenkov 2016-04-06 11:19:10 +03:00
parent 7f3744f07f
commit 8fe4290f1c
13 changed files with 50 additions and 49 deletions

View file

@ -1007,13 +1007,14 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
fn variant(&self, span: Span, name: Ident, tys: Vec<P<ast::Ty>> ) -> ast::Variant {
let fields: Vec<_> = tys.into_iter().map(|ty| {
Spanned { span: ty.span, node: ast::StructField_ {
ast::StructField {
span: ty.span,
ty: ty,
ident: None,
vis: ast::Visibility::Inherited,
attrs: Vec::new(),
id: ast::DUMMY_NODE_ID,
}}
}
}).collect();
let vdata = if fields.is_empty() {