diff --git a/src/fallback.rs b/src/fallback.rs index fbce9c4..3b1441b 100644 --- a/src/fallback.rs +++ b/src/fallback.rs @@ -664,6 +664,13 @@ impl Span { } } +#[cfg(all(not(wrap_proc_macro), feature = "proc-macro"))] +impl From for crate::Span { + fn from(_: proc_macro::Span) -> Self { + crate::Span::_new(Span::call_site()) + } +} + impl Debug for Span { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { #[cfg(span_locations)]