Hacker News new | ask | show | jobs
by oconnor663 2245 days ago
You can Box Copy types, yes, but the result is !Copy. So for example, maybe I have a slice of ints, and I'm calling ptr::copy_nonoverlapping on that slice. (Maybe via safe code, like slice::copy_from_slice.) That no longer works; I need new heap allocations for each int. And my slices of ints no longer have a memory layout that's compatible with C, so all ffi breaks?
1 comments

Ah yeah.

I do think you're correct here, which is that this idea sounds simple but has a lot of edge cases.