-
-
Notifications
You must be signed in to change notification settings - Fork 8
We may need a Send
/Sync
wrapper instead of NonNull<T>
#16
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
Comments
…n-types#16" This reverts commit 3c77c57.
That seems like a poorly designed lint, since it will by definition trigger any time someone unsafely implements Sync or Send: rust-lang/rust-clippy#8045. |
I agree, use |
The lint was moved to the nursery in |
As you known, when we declare a foreign type that implements
Send
andSync
It will generate a type that wrap the
NonNull<T>
.Then the nightly
clippy
will give anon_send_fields_in_send_ty
warning, becauseNonNull<T>
is!Send
and!Sync
.We need a
Send
/Sync
wrapper instead ofNonNull<T>
, maybe change to useUnsafeCell<NonNull<T>>
?The text was updated successfully, but these errors were encountered: