Skip to content

Commit 1380508

Browse files
committed
Add From<proc_macro::Span> for proc_macro2::Span.
1 parent 12f379e commit 1380508

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unstable.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ pub struct LineColumn {
216216
#[derive(Copy, Clone)]
217217
pub struct Span(proc_macro::Span);
218218

219+
impl From<proc_macro::Span> for ::Span {
220+
fn from(proc_span: proc_macro::Span) -> ::Span {
221+
::Span(Span(proc_span))
222+
}
223+
}
224+
219225
impl Span {
220226
pub fn call_site() -> Span {
221227
Span(proc_macro::Span::call_site())

0 commit comments

Comments
 (0)