|
38 | 38 | // this crate without this line making `rustc_span` available. |
39 | 39 | extern crate self as rustc_span; |
40 | 40 |
|
| 41 | +use derive_where::derive_where; |
41 | 42 | use rustc_data_structures::{outline, AtomicRef}; |
42 | 43 | use rustc_macros::{Decodable, Encodable, HashStable_Generic}; |
43 | 44 | use rustc_serialize::opaque::{FileEncoder, MemDecoder}; |
@@ -467,18 +468,18 @@ impl FileName { |
467 | 468 | /// `SpanData` is public because `Span` uses a thread-local interner and can't be |
468 | 469 | /// sent to other threads, but some pieces of performance infra run in a separate thread. |
469 | 470 | /// Using `Span` is generally preferred. |
470 | | -#[derive(Clone, Copy, Hash, PartialEq, Eq, derivative::Derivative)] |
471 | | -#[derivative(PartialOrd, Ord)] |
| 471 | +#[derive(Clone, Copy, Hash, PartialEq, Eq)] |
| 472 | +#[derive_where(PartialOrd, Ord)] |
472 | 473 | pub struct SpanData { |
473 | 474 | pub lo: BytePos, |
474 | 475 | pub hi: BytePos, |
475 | 476 | /// Information about where the macro came from, if this piece of |
476 | 477 | /// code was created by a macro expansion. |
477 | | - #[derivative(PartialOrd = "ignore", Ord = "ignore")] |
| 478 | + #[derive_where(skip)] |
478 | 479 | // `SyntaxContext` does not implement `Ord`. |
479 | 480 | // The other fields are enough to determine in-file order. |
480 | 481 | pub ctxt: SyntaxContext, |
481 | | - #[derivative(PartialOrd = "ignore", Ord = "ignore")] |
| 482 | + #[derive_where(skip)] |
482 | 483 | // `LocalDefId` does not implement `Ord`. |
483 | 484 | // The other fields are enough to determine in-file order. |
484 | 485 | pub parent: Option<LocalDefId>, |
|
0 commit comments