at master 620 B view raw
1// SPDX-License-Identifier: Apache-2.0 OR MIT 2 3use alloc::rc::Rc; 4use core::marker::PhantomData; 5use core::panic::{RefUnwindSafe, UnwindSafe}; 6 7// Zero sized marker with the correct set of autotrait impls we want all proc 8// macro types to have. 9#[derive(Copy, Clone)] 10#[cfg_attr( 11 all(procmacro2_semver_exempt, any(not(wrap_proc_macro), super_unstable)), 12 derive(PartialEq, Eq) 13)] 14pub(crate) struct ProcMacroAutoTraits(PhantomData<Rc<()>>); 15 16pub(crate) const MARKER: ProcMacroAutoTraits = ProcMacroAutoTraits(PhantomData); 17 18impl UnwindSafe for ProcMacroAutoTraits {} 19impl RefUnwindSafe for ProcMacroAutoTraits {}