1 2 3 4 5 6 7 8 9 10 11 12
use gc::{Finalize, Gc, Trace}; // This impl should *not* require T: Trace. #[derive(Finalize, Trace)] struct Thunk<T>(fn() -> T); struct NotTrace; #[test] fn test_derive_bounds() { let _: Gc<Thunk<NotTrace>> = Gc::new(Thunk(|| NotTrace)); }