fieldx_aux 0.1.6

Various types and tools useful for fieldx crates and, potentially, to users of fieldx
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use proc_macro2::Span;
use syn::{self, spanned::Spanned};

pub trait FXOrig<O>
where
    O: Spanned,
{
    #[allow(dead_code)]
    fn orig(&self) -> Option<&O>;

    #[allow(dead_code)]
    fn span(&self) -> Option<Span> {
        self.orig().and_then(|o| Some(o.span()))
    }
}