let generate_field_attrs_code create FieldInfo

this simplifies the code inside the `structure.each` closure argument
and allows to remove the `vis` field from `FieldInfo`.
This commit is contained in:
Christian Poveda
2022-05-19 00:47:45 -05:00
parent 7e9be9240c
commit d839d2ecc2
3 changed files with 14 additions and 46 deletions

View File

@@ -303,7 +303,6 @@ impl<'a> SessionSubdiagnosticDeriveBuilder<'a> {
let inner_ty = FieldInnerTy::from_type(&ast.ty);
let info = FieldInfo {
vis: &ast.vis,
binding: binding,
ty: inner_ty.inner_type().unwrap_or(&ast.ty),
span: &ast.span(),