We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mut is required for https://doc.servo.org/mozjs/gc/root/struct.MutableHandle.html#tymethod.set, but this is still weird as MutableHandle is clonable so &mut does not help a lot with safety.
&mut
Originally posted by @sagudev in servo/servo#34087 (comment)
When cloning MutableHandle we still have underlying pointer point to same location, so we can have two &mut that points to same location.
The text was updated successfully, but these errors were encountered:
I think the proper solution would be to not impl Clone/Copy for *Handle or at least mark it as unsafe.
Sorry, something went wrong.
I think the first action point would be to remove all mozjs::rust::wrappers usages, then we can remove clone,copy in followup.
mozjs::rust::wrappers
No branches or pull requests
mut is required for https://doc.servo.org/mozjs/gc/root/struct.MutableHandle.html#tymethod.set, but this is still weird as MutableHandle is clonable so
&mut
does not help a lot with safety.Originally posted by @sagudev in servo/servo#34087 (comment)
When cloning MutableHandle we still have underlying pointer point to same location, so we can have two &mut that points to same location.
The text was updated successfully, but these errors were encountered: