1 //! Stubs for when profiling is disabled to have the "executing_pc" field
2 //! basically compiled away.
3 
4 use core::marker;
5 
6 #[derive(Default, Clone)]
7 pub(crate) struct ExecutingPc;
8 
9 impl ExecutingPc {
as_ref(&self) -> ExecutingPcRef<'_>10     pub(crate) fn as_ref(&self) -> ExecutingPcRef<'_> {
11         ExecutingPcRef {
12             _marker: marker::PhantomData,
13         }
14     }
15 
set_done(&self)16     pub(crate) fn set_done(&self) {}
17 }
18 
19 #[derive(Copy, Clone)]
20 #[repr(transparent)]
21 pub(crate) struct ExecutingPcRef<'a> {
22     _marker: marker::PhantomData<&'a ()>,
23 }
24 
25 impl ExecutingPcRef<'_> {
record(&self, pc: usize)26     pub(crate) fn record(&self, pc: usize) {
27         let _ = pc;
28     }
29 }
30