summaryrefslogtreecommitdiffstats
path: root/src/marker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/marker.rs')
-rw-r--r--src/marker.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/marker.rs b/src/marker.rs
index e8874bd..23b94ce 100644
--- a/src/marker.rs
+++ b/src/marker.rs
@@ -4,18 +4,14 @@ use core::panic::{RefUnwindSafe, UnwindSafe};
// Zero sized marker with the correct set of autotrait impls we want all proc
// macro types to have.
-pub(crate) type Marker = PhantomData<ProcMacroAutoTraits>;
+#[derive(Copy, Clone)]
+#[cfg_attr(
+ all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)),
+ derive(PartialEq, Eq)
+)]
+pub(crate) struct ProcMacroAutoTraits(PhantomData<Rc<()>>);
-pub(crate) use self::value::*;
-
-mod value {
- pub(crate) use core::marker::PhantomData as Marker;
-}
-
-pub(crate) struct ProcMacroAutoTraits(
- #[allow(dead_code)] // https://github.com/rust-lang/rust/issues/119645
- Rc<()>,
-);
+pub(crate) const MARKER: ProcMacroAutoTraits = ProcMacroAutoTraits(PhantomData);
impl UnwindSafe for ProcMacroAutoTraits {}
impl RefUnwindSafe for ProcMacroAutoTraits {}