xref: /third_party/rust/crates/proc-macro2/src/marker.rs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/rust/crates/proc-macro2/src/
17ac06127Sopenharmony_ciuse alloc::rc::Rc;
27ac06127Sopenharmony_ciuse core::marker::PhantomData;
37ac06127Sopenharmony_ciuse core::panic::{RefUnwindSafe, UnwindSafe};
47ac06127Sopenharmony_ci
57ac06127Sopenharmony_ci// Zero sized marker with the correct set of autotrait impls we want all proc
67ac06127Sopenharmony_ci// macro types to have.
77ac06127Sopenharmony_cipub(crate) type Marker = PhantomData<ProcMacroAutoTraits>;
87ac06127Sopenharmony_ci
97ac06127Sopenharmony_cipub(crate) use self::value::*;
107ac06127Sopenharmony_ci
117ac06127Sopenharmony_cimod value {
127ac06127Sopenharmony_ci    pub(crate) use core::marker::PhantomData as Marker;
137ac06127Sopenharmony_ci}
147ac06127Sopenharmony_ci
157ac06127Sopenharmony_cipub(crate) struct ProcMacroAutoTraits(
167ac06127Sopenharmony_ci    #[allow(dead_code)] // https://github.com/rust-lang/rust/issues/119645
177ac06127Sopenharmony_ci    Rc<()>,
187ac06127Sopenharmony_ci);
197ac06127Sopenharmony_ci
207ac06127Sopenharmony_ciimpl UnwindSafe for ProcMacroAutoTraits {}
217ac06127Sopenharmony_ciimpl RefUnwindSafe for ProcMacroAutoTraits {}
22

Indexes created Thu Nov 07 10:32:03 CST 2024