gc 0.5.1

Tracing garbage collector plugin for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use gc::{force_collect, Finalize, Gc, Trace};

#[derive(Finalize, Trace)]
struct S(#[unsafe_ignore_trace] Gc<()>);

/// Using `#[unsafe_ignore_trace]` on a `Gc` may inhibit collection of
/// cycles through that `Gc`, but it should not result in panics.
#[test]
fn ignore_trace_gc() {
    *Gc::new(S(Gc::new(()))).0;
    force_collect();
}