by pcwalton · 7y ago · 0 comments
For example (pseudocode):
void f(shared_ptr<Foo> a, shared_ptr<Foo> b) {
g(&mut *a.field, &mut *b.field);
}
This is unsafe because a and b might point to the same object.The short of it is that the compiler will enforce that the same pointer is not provided to function more then once at the call site.