diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:38:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:38:31 +0000 |
commit | 017a0f00b2f35e8f0d3c5175d558cd4e706c305d (patch) | |
tree | 669ae5e120a957271aafa639969279bac10004e4 /src/marker.rs | |
parent | Releasing progress-linux version 1.0.76-1~progress7.99u1. (diff) | |
download | rust-proc-macro2-017a0f00b2f35e8f0d3c5175d558cd4e706c305d.tar.xz rust-proc-macro2-017a0f00b2f35e8f0d3c5175d558cd4e706c305d.zip |
Merging upstream version 1.0.81.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/marker.rs')
-rw-r--r-- | src/marker.rs | 18 |
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 {} |