-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
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
Send/Sync impls are unsafe #26
Comments
I think you are right - I'll add the necessary constraints and see what happens. |
I pushed a new version, feel free to close this if the new impls look right to you. |
Looks good to me. Thanks for the speedy fix! |
P.S. You may want to consider yanking the previous versions if you haven't done so already to reduce the risk that people accidentally depend on them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the following impls are unsafe
You need to check not only O, but also &T/&mut T. For example, if T is a Cell, this would improperly implement Sync. This can happen either if O contains a mutex that you map() into, or you map() into an unrelated 'static reference.
The text was updated successfully, but these errors were encountered: