]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_session/src/config.rs
Rollup merge of #105005 - estebank:where-clause-lts, r=compiler-errors
[rust.git] / compiler / rustc_session / src / config.rs
index d8c4b0845d0acb67bc60114c74b98196ec25ed31..7a20100fd313368ebe24f86e539789af442ed514 100644 (file)
@@ -10,7 +10,7 @@
 
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 
-use rustc_data_structures::stable_hasher::ToStableHashKey;
+use rustc_data_structures::stable_hasher::{StableOrd, ToStableHashKey};
 use rustc_target::abi::Align;
 use rustc_target::spec::{PanicStrategy, SanitizerSet, SplitDebuginfo};
 use rustc_target::spec::{Target, TargetTriple, TargetWarnings, TARGETS};
@@ -288,6 +288,9 @@ pub enum OutputType {
     DepInfo,
 }
 
+// Safety: Trivial C-Style enums have a stable sort order across compilation sessions.
+unsafe impl StableOrd for OutputType {}
+
 impl<HCX: HashStableContext> ToStableHashKey<HCX> for OutputType {
     type KeyType = Self;