We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rustc_span::hygiene::LocalExpnId
1 parent b4bf56c commit 98fe2ebCopy full SHA for 98fe2eb
compiler/rustc_span/src/hygiene.rs
@@ -85,10 +85,17 @@ rustc_index::newtype_index! {
85
/// A unique ID associated with a macro invocation and expansion.
86
pub struct LocalExpnId {
87
ENCODABLE = custom
88
+ ORD_IMPL = custom
89
DEBUG_FORMAT = "expn{}"
90
}
91
92
93
+// To ensure correctness of incremental compilation,
94
+// `LocalExpnId` must not implement `Ord` or `PartialOrd`.
95
+// See https://github.com/rust-lang/rust/issues/90317.
96
+impl !Ord for LocalExpnId {}
97
+impl !PartialOrd for LocalExpnId {}
98
+
99
/// Assert that the provided `HashStableContext` is configured with the 'default'
100
/// `HashingControls`. We should always have bailed out before getting to here
101
/// with a non-default mode. With this check in place, we can avoid the need
0 commit comments