Macro mjb_gc::unsafe_empty_trace[][src]

macro_rules! unsafe_empty_trace {
    () => { ... };
}
Expand description

Implement an empty trace on a type.

This is used inside the impl of Trace for a type that does not own any Gc pointers:

use mjb_gc::{unsafe_empty_trace, Trace};

struct A;

unsafe impl Trace for A {
    unsafe_empty_trace! {}
}

The recommended (and shorter) way is to instead derive Trace onto the type.

use mjb_gc::Trace;

#[derive(Trace)]
struct B;