proc_macro2/
marker.rs

1use alloc::rc::Rc;
2use core::marker::PhantomData;
3use core::panic::{RefUnwindSafe, UnwindSafe};
4
5// Zero sized marker with the correct set of autotrait impls we want all proc
6// macro types to have.
7#[derive(#[automatically_derived]
impl ::core::marker::Copy for ProcMacroAutoTraits { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ProcMacroAutoTraits {
    #[inline]
    fn clone(&self) -> ProcMacroAutoTraits {
        let _: ::core::clone::AssertParamIsClone<PhantomData<Rc<()>>>;
        *self
    }
}Clone)]
8#[cfg_attr(
9    all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)),
10    derive(PartialEq, Eq)
11)]
12pub(crate) struct ProcMacroAutoTraits(PhantomData<Rc<()>>);
13
14pub(crate) const MARKER: ProcMacroAutoTraits = ProcMacroAutoTraits(PhantomData);
15
16impl UnwindSafe for ProcMacroAutoTraits {}
17impl RefUnwindSafe for ProcMacroAutoTraits {}