Skip to content

Commit 066520d

Browse files
authored
Merge pull request #45 from SergioBenitez/master
Add From<proc_macro::Span> for proc_macro2::Span.
2 parents f2c7105 + 1380508 commit 066520d

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
@@ -215,6 +215,12 @@ pub struct LineColumn {
215215
#[derive(Copy, Clone)]
216216
pub struct Span(proc_macro::Span);
217217

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

0 commit comments

Comments
 (0)