Use a cfg called proc_macro_span to control feature(proc_macro_span)
diff --git a/src/wrapper.rs b/src/wrapper.rs
index cbb6515..8413eaa 100644
--- a/src/wrapper.rs
+++ b/src/wrapper.rs
@@ -478,12 +478,12 @@
#[cfg(any(super_unstable, feature = "span-locations"))]
pub fn start(&self) -> LineColumn {
match self {
- #[cfg(nightly)]
+ #[cfg(proc_macro_span)]
Span::Compiler(s) => {
let proc_macro::LineColumn { line, column } = s.start();
LineColumn { line, column }
}
- #[cfg(not(nightly))]
+ #[cfg(not(proc_macro_span))]
Span::Compiler(_) => LineColumn { line: 0, column: 0 },
Span::Fallback(s) => {
let fallback::LineColumn { line, column } = s.start();
@@ -495,12 +495,12 @@
#[cfg(any(super_unstable, feature = "span-locations"))]
pub fn end(&self) -> LineColumn {
match self {
- #[cfg(nightly)]
+ #[cfg(proc_macro_span)]
Span::Compiler(s) => {
let proc_macro::LineColumn { line, column } = s.end();
LineColumn { line, column }
}
- #[cfg(not(nightly))]
+ #[cfg(not(proc_macro_span))]
Span::Compiler(_) => LineColumn { line: 0, column: 0 },
Span::Fallback(s) => {
let fallback::LineColumn { line, column } = s.end();