Un-unsafe the StableOrd trait
Whilst incorrect implementations of this trait can cause miscompilation, they cannot cause memory unsafety in rustc.
This commit is contained in:
@@ -425,10 +425,10 @@ pub struct Size {
|
||||
raw: u64,
|
||||
}
|
||||
|
||||
// Safety: Ord is implement as just comparing numerical values and numerical values
|
||||
// Ord is implement as just comparing numerical values and numerical values
|
||||
// are not changed by (de-)serialization.
|
||||
#[cfg(feature = "nightly")]
|
||||
unsafe impl StableOrd for Size {
|
||||
impl StableOrd for Size {
|
||||
const CAN_USE_UNSTABLE_SORT: bool = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user