mozilla/rust — Issue #1907: ctypes::void still isn't correct
Author: brson
Created: 2012-02-26 22:30:30+00:00
State: open
Labels: A-libs, I-wrong

This type is intended to only be used as an opaque type for unsafe pointers to point to. It is defined in a way that isn't constructable or destructurable, but it is still a copyable type. That means that you can define `type complicated_c_struct = ctypes::void` with the intent of using it only as an unsafe pointer, but could potentially write `let newcopy = *complicated_c_struct` and create a big mess.

We could put a resource field inside it to prevent this.