Besides side-stepping the compiler's ability to enforce safety, is there anything inherently unsafe about manipulating a non-copyable type via its pointer? My thinking is no, but for example — so long as I don't ever let the pointer to lock escape withUnsafeMutablePointer, is this guaranteed to be "safe"?
Noncopyable types are subject to the same pointer rules as everything else. A pointer you get from withUnsafe*Pointer is only good for the duration of the call and can't be escaped, and you have to respect the exclusivity of the argument for the duration of the call. For a lock, you probably don't want exclusive access to be imposed when taking and releasing the lock; can you use the standard Mutex type, or build your own lock using an Atomic?