1 //! Dummy GC types for when the `gc` cargo feature is disabled.
2 
3 use super::VMGcRef;
4 
5 pub enum VMExternRef {}
6 
7 pub enum VMStructRef {}
8 
9 pub enum VMArrayRef {}
10 
11 pub enum VMExnRef {}
12 
13 pub struct VMGcObjectData {
14     _inner: VMStructRef,
15     _phantom: core::marker::PhantomData<[u8]>,
16 }
17 
18 impl VMGcRef {
into_structref_unchecked(self) -> VMStructRef19     pub fn into_structref_unchecked(self) -> VMStructRef {
20         unreachable!()
21     }
22 
into_exnref_unchecked(self) -> VMExnRef23     pub fn into_exnref_unchecked(self) -> VMExnRef {
24         unreachable!()
25     }
26 }
27 
28 impl From<VMStructRef> for VMGcRef {
from(s: VMStructRef) -> VMGcRef29     fn from(s: VMStructRef) -> VMGcRef {
30         match s {}
31     }
32 }
33 
34 impl From<VMExnRef> for VMGcRef {
from(e: VMExnRef) -> VMGcRef35     fn from(e: VMExnRef) -> VMGcRef {
36         match e {}
37     }
38 }
39 
40 impl<'a> From<&'a [u8]> for &'a VMGcObjectData {
from(_: &'a [u8]) -> Self41     fn from(_: &'a [u8]) -> Self {
42         unreachable!()
43     }
44 }
45 
46 impl<'a> From<&'a mut [u8]> for &'a mut VMGcObjectData {
from(_: &'a mut [u8]) -> Self47     fn from(_: &'a mut [u8]) -> Self {
48         unreachable!()
49     }
50 }
51