1use proc_macro2::Span;
2use syn::Member;
3
4pub trait MemberSpan {
5 fn member_span(&self) -> Span;
6}
7
8impl MemberSpan for Member {
9 fn member_span(&self) -> Span {
10 match self {
11 Member::Named(ident: &Ident) => ident.span(),
12 Member::Unnamed(index: &Index) => index.span,
13 }
14 }
15}
16