-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add missing Send/Sync impls #225
Conversation
src/cell.rs
Outdated
@@ -47,6 +47,10 @@ pub struct Ref<'a, T: ?Sized + 'a> { | |||
value: NonNull<T>, | |||
} | |||
|
|||
// SAFETY: `Ref<'_, T> acts as a reference. | |||
unsafe impl<'a, T: ?Sized + 'a> Sync for Ref<'a, T> where T: Sync {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is correct, but can we express the bounds as where for<'a> &'a T: Sync
and where for<'a> &'a T: Send
instead so we're matching the impls with those of actual references?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I would like to double check if this works when T
is not 'static
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine
89b4cc2
to
9301b26
Compare
9301b26
to
14096ad
Compare
Miri failure? Hopefully nothing important |
This is to be expected for now. |
Forgot these in #223!