about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/hir_id.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_hir/src/hir_id.rs')
-rw-r--r--compiler/rustc_hir/src/hir_id.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_hir/src/hir_id.rs b/compiler/rustc_hir/src/hir_id.rs
index d549f52f873..34c61577936 100644
--- a/compiler/rustc_hir/src/hir_id.rs
+++ b/compiler/rustc_hir/src/hir_id.rs
@@ -166,7 +166,9 @@ impl ItemLocalId {
 
 // Safety: Ord is implement as just comparing the ItemLocalId's numerical
 // values and these are not changed by (de-)serialization.
-unsafe impl StableOrd for ItemLocalId {}
+unsafe impl StableOrd for ItemLocalId {
+    const CAN_USE_UNSTABLE_SORT: bool = true;
+}
 
 /// The `HirId` corresponding to `CRATE_NODE_ID` and `CRATE_DEF_ID`.
 pub const CRATE_HIR_ID: HirId =