diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:38:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 05:38:30 +0000 |
commit | 7a5d77da248199cc79019b3e264d2b8f5186f883 (patch) | |
tree | a8b0ee19e56b828c857f2ce0d6865298ee62bccf /src/marker.rs | |
parent | Adding debian version 1.0.76-1. (diff) | |
download | rust-proc-macro2-7a5d77da248199cc79019b3e264d2b8f5186f883.tar.xz rust-proc-macro2-7a5d77da248199cc79019b3e264d2b8f5186f883.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 {} |