rust-hosted-langs / book

Writing Interpreters in Rust: a Guide
https://rust-hosted-langs.github.io/book/
Creative Commons Attribution 4.0 International
479 stars 27 forks source link

CellPtr and TaggedCellPtr can't be Copy because std::cell::Cell isn't copy #34

Open pliniker opened 4 years ago

pliniker commented 4 years ago

This seems wrong. Since these types are just storing word-sized pointers and the behavior we want is to be able to copy them optimally, there should be no other reason why they can't be Copy.

There must be a crate out there that provides Cell mechanics while also being Copy, maybe we need to define our own.