dreck 0.1.1

A safe tracing garbage collection library with minimal safety bookkeeping
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use dreck::*;

fn coerce_same<'gc, 'own, A: Trace<'own>, B: Trace<'own>>(_: Gc<'gc, 'own, A>, _: Gc<'gc, 'own, B>) {}

fn main() {
    new_root!(owner, root);

    let a = root.add(0u32);
    {
        let b = root.add(1u32);
        root!(&root, b);
        coerce_same(a, b);
    }
}