diff options
| author | Christian Poveda <git@pvdrz.com> | 2022-05-19 00:47:45 -0500 |
|---|---|---|
| committer | Christian Poveda <git@pvdrz.com> | 2022-05-19 00:47:45 -0500 |
| commit | d839d2ecc274f4633bbb621d169d84347ffc2ba9 (patch) | |
| tree | 8fcedc33bc4049d8f2ac34720ee51521cee47f62 /compiler/rustc_macros/src/diagnostics/utils.rs | |
| parent | 7e9be9240cf1f3c2fc48fffbb202b249821c61b2 (diff) | |
| download | rust-d839d2ecc274f4633bbb621d169d84347ffc2ba9.tar.gz rust-d839d2ecc274f4633bbb621d169d84347ffc2ba9.zip | |
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`.
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/utils.rs')
| -rw-r--r-- | compiler/rustc_macros/src/diagnostics/utils.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/utils.rs b/compiler/rustc_macros/src/diagnostics/utils.rs index af5a30880e0..636bcf1f7b1 100644 --- a/compiler/rustc_macros/src/diagnostics/utils.rs +++ b/compiler/rustc_macros/src/diagnostics/utils.rs @@ -4,7 +4,7 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens}; use std::collections::BTreeSet; use std::str::FromStr; -use syn::{spanned::Spanned, Attribute, Meta, Type, TypeTuple, Visibility}; +use syn::{spanned::Spanned, Attribute, Meta, Type, TypeTuple}; use synstructure::BindingInfo; /// Checks whether the type name of `ty` matches `name`. @@ -158,7 +158,6 @@ impl<'ty> FieldInnerTy<'ty> { /// Field information passed to the builder. Deliberately omits attrs to discourage the /// `generate_*` methods from walking the attributes themselves. pub(crate) struct FieldInfo<'a> { - pub(crate) vis: &'a Visibility, pub(crate) binding: &'a BindingInfo<'a>, pub(crate) ty: &'a Type, pub(crate) span: &'a proc_macro2::Span, |
