Unique<T> is unsafe
Someone created this PR on github: https://github.com/redox-os/kernel/pull/94
The description is repeated here in case the PR is lost.
Hi, I found a memory-safety/soundness issue in this crate while scanning Rust code for potential vulnerabilities. This PR contains a fix for the issue. Issue Description
Unique unconditionally implements Sync. This allows users to create data races on T: !Sync. Such data races can lead to undefined behavior.
kernel/src/common/unique.rs, Lines 15 to 16 in 7269f9c6
unsafe impl<T> Send for Unique<T> {}
unsafe impl<T> Sync for Unique<T> {}