]> git.proxmox.com Git - rustc.git/blob - vendor/proc-macro2/src/marker.rs
New upstream version 1.73.0+dfsg1
[rustc.git] / vendor / proc-macro2 / src / marker.rs
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(Rc<()>);
16
17 impl UnwindSafe for ProcMacroAutoTraits {}
18 impl RefUnwindSafe for ProcMacroAutoTraits {}