kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
436 stars 36 forks source link

`DynamicRootSet` additions #72

Closed moulins closed 1 year ago

moulins commented 1 year ago
kyren commented 1 year ago

LGTM, I almost asked why we can't use the automatic Collect impl on DynamicRootSet before I remembered that the Collect derive doesn't work within the gc-arena crate itself 🤦‍♀️. It's probably not worth fixing that since the implementations are so minimal, but it is kind of annoying.

Veykril commented 1 year ago

Fwiw, it would be pretty easy to make the derive macro work in gc-arena itself by just adding an extern crate self as gc_arena; alias to the crate root of gc-arena.

Though its questionable whether you should use it if you don't have to since that would make gc-arena itself depend on syn.

kyren commented 1 year ago

Yeah I know that would make it work and I thought about that, it's just always a pretty minor thing so it never feels worth it.

moulins commented 1 year ago

Using the derive macro would only allow getting rid of the trivial impl Collect for DynamicRootSet, so it's not even that useful IMHO.