File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments