Meaningful spans when invoking serializer trait methods

This commit is contained in:
David Tolnay
2018-01-10 19:22:07 -08:00
parent 5c41661bce
commit cc2558b0dc
2 changed files with 74 additions and 19 deletions
+2
View File
@@ -35,6 +35,7 @@ pub struct Field<'a> {
pub ident: Option<syn::Ident>,
pub attrs: attr::Field,
pub ty: &'a syn::Type,
pub original: &'a syn::Field,
}
#[derive(Copy, Clone)]
@@ -157,6 +158,7 @@ fn fields_from_ast<'a>(
ident: field.ident,
attrs: attr::Field::from_ast(cx, i, field, attrs, container_default),
ty: &field.ty,
original: &field,
})
.collect()
}