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
|
@ -491,8 +491,8 @@ pub enum OutputType {
|
|||
DepInfo,
|
||||
}
|
||||
|
||||
// Safety: Trivial C-Style enums have a stable sort order across compilation sessions.
|
||||
unsafe impl StableOrd for OutputType {
|
||||
// Trivial C-Style enums have a stable sort order across compilation sessions.
|
||||
impl StableOrd for OutputType {
|
||||
const CAN_USE_UNSTABLE_SORT: bool = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue