about summary refs log tree commit diff
path: root/compiler/rustc_session/src
diff options
context:
space:
mode:
authorAlan Egerton <eggyal@gmail.com>2024-06-12 13:01:22 +0100
committerAlan Egerton <eggyal@gmail.com>2024-06-12 13:01:22 +0100
commit114dd2061e0bfa6bc1353d0265389cfaa04d8858 (patch)
tree4878585dc756c16cb2a5ff9ee82ac01d717ee158 /compiler/rustc_session/src
parent02c7a5921e3de5c2b3ecb2e0082c1dafce0729a1 (diff)
downloadrust-114dd2061e0bfa6bc1353d0265389cfaa04d8858.tar.gz
rust-114dd2061e0bfa6bc1353d0265389cfaa04d8858.zip
Un-unsafe the `StableOrd` trait
Whilst incorrect implementations of this trait can cause miscompilation,
they cannot cause memory unsafety in rustc.
Diffstat (limited to 'compiler/rustc_session/src')
-rw-r--r--compiler/rustc_session/src/config.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index a622f1b577d..d5428df0329 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -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;
 }