Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


Ah yeah.

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: