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:
parent
02c7a5921e
commit
114dd2061e
6 changed files with 26 additions and 25 deletions
|
@ -165,9 +165,9 @@ impl ItemLocalId {
|
|||
pub const INVALID: ItemLocalId = ItemLocalId::MAX;
|
||||
}
|
||||
|
||||
// Safety: Ord is implement as just comparing the ItemLocalId's numerical
|
||||
// Ord is implement as just comparing the ItemLocalId's numerical
|
||||
// values and these are not changed by (de-)serialization.
|
||||
unsafe impl StableOrd for ItemLocalId {
|
||||
impl StableOrd for ItemLocalId {
|
||||
const CAN_USE_UNSTABLE_SORT: bool = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue