• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use alloc::rc::Rc;
2 use core::marker::PhantomData;
3 use 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 pub(crate) type Marker = PhantomData<ProcMacroAutoTraits>;
8 
9 pub(crate) use self::value::*;
10 
11 mod value {
12     pub(crate) use core::marker::PhantomData as Marker;
13 }
14 
15 pub(crate) struct ProcMacroAutoTraits(
16     #[allow(dead_code)] // https://github.com/rust-lang/rust/issues/119645
17     Rc<()>,
18 );
19 
20 impl UnwindSafe for ProcMacroAutoTraits {}
21 impl RefUnwindSafe for ProcMacroAutoTraits {}
22