kyren / gc-arena

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

Fix building on platforms without Arc #81

Closed dragazo closed 10 months ago

dragazo commented 10 months ago

alloc::sync::Arc only exists on platforms with atomic pointer-size operations. Our inclusion of Collect for Arc<T> was unconditional, so this was causing compile errors on platforms that don't have such atomic operations. I just added a cfg so we can keep it on all platforms that allow it.

kyren commented 10 months ago

Makes sense to me!