Skip to content

Commit 87df3f6

Browse files
authored
Rollup merge of #94614 - pierwill:localexpnid-noord, r=lcnr
Remove ordering traits from `rustc_span::hygiene::LocalExpnId` Part of work on #90317. Also adds a negative impl block as a form of documentation and a roadblock to regression.
2 parents 2c98eda + 98fe2eb commit 87df3f6

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)