Skip to content

Commit 98fe2eb

Browse files
committed
Remove ordering traits from rustc_span::hygiene::LocalExpnId
1 parent b4bf56c commit 98fe2eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_span/src/hygiene.rs

+7
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,17 @@ rustc_index::newtype_index! {
8585
/// A unique ID associated with a macro invocation and expansion.
8686
pub struct LocalExpnId {
8787
ENCODABLE = custom
88+
ORD_IMPL = custom
8889
DEBUG_FORMAT = "expn{}"
8990
}
9091
}
9192

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+
9299
/// Assert that the provided `HashStableContext` is configured with the 'default'
93100
/// `HashingControls`. We should always have bailed out before getting to here
94101
/// with a non-default mode. With this check in place, we can avoid the need

0 commit comments

Comments
 (0)