commit | 16a1720b5b87157d1777da0cd85efb9cb1baff20 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun Dec 31 10:47:24 2017 -0500 |
committer | David Tolnay <dtolnay@gmail.com> | Sun Dec 31 10:49:43 2017 -0500 |
tree | 890ec88c7302615077918ca01dc93f5f79f6998a | |
parent | 92ab1b4e3e3bc6defa7716c95cb0af0a6d66f0f6 [diff] [blame] |
Span::unstable to expose the proc_macro::Span
diff --git a/src/lib.rs b/src/lib.rs index de3a2e5..62fa595 100644 --- a/src/lib.rs +++ b/src/lib.rs
@@ -162,6 +162,12 @@ Span(imp::Span::def_site()) } + /// This method is only available when the `"unstable"` feature is enabled. + #[cfg(feature = "unstable")] + pub fn unstable(self) -> proc_macro::Span { + self.0.unstable() + } + #[cfg(procmacro2_unstable)] pub fn source_file(&self) -> SourceFile { SourceFile(self.0.source_file())