Move span into StructField
This commit is contained in:
parent
7f3744f07f
commit
8fe4290f1c
13 changed files with 50 additions and 49 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue