We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Partial/Ord
DefId
1 parent 5f4ac61 commit cf3ab41Copy full SHA for cf3ab41
compiler/rustc_span/src/def_id.rs
@@ -234,6 +234,12 @@ pub struct DefId {
234
pub index: DefIndex,
235
}
236
237
+// To ensure correctness of incremental compilation,
238
+// `DefId` must not implement `Ord` or `PartialOrd`.
239
+// See https://github.com/rust-lang/rust/issues/90317.
240
+impl !Ord for DefId {}
241
+impl !PartialOrd for DefId {}
242
+
243
// On 64-bit systems, we can hash the whole `DefId` as one `u64` instead of two `u32`s. This
244
// improves performance without impairing `FxHash` quality. So the below code gets compiled to a
245
// noop on little endian systems because the memory layout of `DefId` is as follows:
0 commit comments