[Pitch] Constrain implicit raw pointer conversion to bitwise-copyable values

That's a great point. Having the UniqueAddress stored in-line can look like shared mutable state to ASAN.

This returns a pointer to the local variable that holds self, not the address of the object. The self local variable is copied by default when it's passed to the method, so it could be the address of a temporary stack slot. Not guaranteed to be unique or stable.

I don't see any problem with that. In fact it looks like the least-effort workaround for existing code if you don't need a String key.

Thanks for the feedback! I updated the workarounds section to mention the Void? workaround and changed the property wrapper to a class since in-line storage bothers ASAN:

Ok, that makes sense.
So, we could have done something like:

return withUnsafeBytes(of: &_placeholder) {

... which would have worked as expected.

I think I'll stick with the Void? for simplicity at this point. Thanks! :+1: