Rename procmacro2_unstable to procmacro2_semver_exempt
diff --git a/src/unstable.rs b/src/unstable.rs
index 56df0dd..f8cd68c 100644
--- a/src/unstable.rs
+++ b/src/unstable.rs
@@ -159,11 +159,11 @@
}
}
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
#[derive(Clone, PartialEq, Eq)]
pub struct FileName(String);
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
impl fmt::Display for FileName {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
@@ -172,11 +172,11 @@
// NOTE: We have to generate our own filename object here because we can't wrap
// the one provided by proc_macro.
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
#[derive(Clone, PartialEq, Eq)]
pub struct SourceFile(proc_macro::SourceFile, FileName);
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
impl SourceFile {
fn new(sf: proc_macro::SourceFile) -> Self {
let filename = FileName(sf.path().to_string());
@@ -193,21 +193,21 @@
}
}
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
impl AsRef<FileName> for SourceFile {
fn as_ref(&self) -> &FileName {
self.path()
}
}
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
impl fmt::Debug for SourceFile {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
-#[cfg(procmacro2_unstable)]
+#[cfg(procmacro2_semver_exempt)]
pub struct LineColumn {
pub line: usize,
pub column: usize,
@@ -229,24 +229,24 @@
self.0
}
- #[cfg(procmacro2_unstable)]
+ #[cfg(procmacro2_semver_exempt)]
pub fn source_file(&self) -> SourceFile {
SourceFile::new(self.0.source_file())
}
- #[cfg(procmacro2_unstable)]
+ #[cfg(procmacro2_semver_exempt)]
pub fn start(&self) -> LineColumn {
let proc_macro::LineColumn{ line, column } = self.0.start();
LineColumn { line, column }
}
- #[cfg(procmacro2_unstable)]
+ #[cfg(procmacro2_semver_exempt)]
pub fn end(&self) -> LineColumn {
let proc_macro::LineColumn{ line, column } = self.0.end();
LineColumn { line, column }
}
- #[cfg(procmacro2_unstable)]
+ #[cfg(procmacro2_semver_exempt)]
pub fn join(&self, other: Span) -> Option<Span> {
self.0.join(other.0).map(Span)
}