mockiato-codegen 0.4.2

Internally used by mockiato for code generation. This crate should never be used directly
Documentation
use proc_macro::Span;
use syn::spanned::Spanned;

pub(crate) trait SpannedUnstable {
    /// Returns a [`proc_macro::Span`] which can be
    /// used to print diagnostic messages.
    fn span_unstable(&self) -> Span;
}

impl<T> SpannedUnstable for T
where
    T: Spanned,
{
    fn span_unstable(&self) -> Span {
        // Turns a `Span` from `syn` into a span from `proc_macro`.
        // Note that this API is only available on nightly
        self.span().unstable()
    }
}