1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate::marker::{GcDeref, GcDrop, GcSafe};
#[doc(hidden)]
#[inline(always)]
pub fn check_gc_deref<T: GcDeref>(_: &T) {}
#[doc(hidden)]
#[inline(always)]
pub fn check_gc_drop<T: GcDrop>(_: &T) {}
#[doc(hidden)]
#[inline(always)]
pub fn check_gc_safe<T: GcSafe>(_: &T) {}
#[macro_export]
macro_rules! mark_send_static_gc_safe {
( $t:ty ) => {
unsafe impl GcSafe for $t where $t: Send + 'static {}
};
}
#[macro_export]
macro_rules! impl_empty_scan_for_send_static {
( $t:ty ) => {
unsafe impl GcSafe for $t where $t: Send + 'static {}
unsafe impl Scan for $t
where
$t: Send + 'static,
{
#[inline(always)]
fn scan(&self, _: &mut crate::Scanner<'_>) {}
}
};
}