Auto merge of #123165 - oli-obk:no_ord_def_id3, r=cjgillot
Stop sorting `Span`s' `SyntaxContext`, as that is incompatible with incremental work towards https://github.com/rust-lang/rust/issues/90317 Luckily no one actually needed these to be sorted, so it didn't even affect diagnostics. I'm guessing they'd have been sorted by creation time anyway, so it wouldn't really have mattered. r? `@cjgillot`
This commit is contained in:
commit
25c9f2ca06
4 changed files with 17 additions and 32 deletions
|
@ -43,9 +43,15 @@ use std::hash::Hash;
|
|||
use tracing::{debug, trace};
|
||||
|
||||
/// A `SyntaxContext` represents a chain of pairs `(ExpnId, Transparency)` named "marks".
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct SyntaxContext(u32);
|
||||
|
||||
// To ensure correctness of incremental compilation,
|
||||
// `SyntaxContext` must not implement `Ord` or `PartialOrd`.
|
||||
// See https://github.com/rust-lang/rust/issues/90317.
|
||||
impl !Ord for SyntaxContext {}
|
||||
impl !PartialOrd for SyntaxContext {}
|
||||
|
||||
#[derive(Debug, Encodable, Decodable, Clone)]
|
||||
pub struct SyntaxContextData {
|
||||
outer_expn: ExpnId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue