unsafe impl<T: ?Sized + Send> Send for UnsafeRef<T> {}
Unsafe Rust review: this is unsound -- UnsafeRef<T> should only implement Send if T is Send + Sync (what Arc does), since sending one instance to another thread would allow it to be referenced from two different threads.
This came up in an internal unsafe review:
In src/unsafe_ref.rs:107
Unsafe Rust review: this is unsound --
UnsafeRef<T>
should only implementSend
ifT
isSend + Sync
(whatArc
does), since sending one instance to another thread would allow it to be referenced from two different threads.