From 19fe4fe3ed3830a6053a8940b808b1b8d89bc705 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 17 Nov 2023 18:38:53 -0800 Subject: [PATCH] Update test suite to nightly-2023-11-18 --- tests/common/eq.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/common/eq.rs b/tests/common/eq.rs index 6180ba6472..87c6f8425a 100644 --- a/tests/common/eq.rs +++ b/tests/common/eq.rs @@ -655,12 +655,15 @@ impl SpanlessEq for TokenKind { _ => false, }, (TokenKind::Interpolated(this), TokenKind::Interpolated(other)) => { - match (this.as_ref(), other.as_ref()) { - (Nonterminal::NtExpr(this), Nonterminal::NtExpr(other)) => { - SpanlessEq::eq(this, other) + let (this, this_span) = this.as_ref(); + let (other, other_span) = other.as_ref(); + SpanlessEq::eq(this_span, other_span) + && match (this, other) { + (Nonterminal::NtExpr(this), Nonterminal::NtExpr(other)) => { + SpanlessEq::eq(this, other) + } + _ => this == other, } - _ => this == other, - } } _ => self == other, } @@ -769,7 +772,7 @@ fn is_escaped_literal_token(token: &Token, unescaped: Symbol) -> bool { Token { kind: TokenKind::Interpolated(nonterminal), span: _, - } => match nonterminal.as_ref() { + } => match &nonterminal.0 { Nonterminal::NtExpr(expr) => match &expr.kind { ExprKind::Lit(lit) => is_escaped_lit(lit, unescaped), _ => false,