Skip to content

Commit 79ef9ff

Browse files
committed
From<proc_macro::Span> is missing when DOCS_RS=1
1 parent 0e82bea commit 79ef9ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/fallback.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,13 @@ impl Span {
664664
}
665665
}
666666

667+
#[cfg(not(wrap_proc_macro))]
668+
impl From<proc_macro::Span> for crate::Span {
669+
fn from(_: proc_macro::Span) -> Self {
670+
crate::Span::_new(Span::call_site())
671+
}
672+
}
673+
667674
impl Debug for Span {
668675
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
669676
#[cfg(span_locations)]

0 commit comments

Comments
 (0)