Skip to content

Commit

Permalink
Update test suite to nightly-2022-07-31
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 31, 2022
1 parent f1089e3 commit fadc8e9
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions tests/common/eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ spanless_eq_enum!(StmtKind; Local(0) Item(0) Expr(0) Semi(0) Empty MacCall(0));
spanless_eq_enum!(StrStyle; Cooked Raw(0));
spanless_eq_enum!(StructRest; Base(0) Rest(0) None);
spanless_eq_enum!(Term; Ty(0) Const(0));
spanless_eq_enum!(TokenTree; Token(0) Delimited(0 1 2));
spanless_eq_enum!(TokenTree; Token(0 1) Delimited(0 1 2));
spanless_eq_enum!(TraitBoundModifier; None Maybe MaybeConst MaybeConstMaybe);
spanless_eq_enum!(TraitObjectSyntax; Dyn None);
spanless_eq_enum!(UintTy; Usize U8 U16 U32 U64 U128);
Expand Down Expand Up @@ -612,7 +612,7 @@ impl SpanlessEq for TokenStream {
if SpanlessEq::eq(this, other) {
continue;
}
if let (TokenTree::Token(this), TokenTree::Token(other)) = (this, other) {
if let (TokenTree::Token(this, _), TokenTree::Token(other, _)) = (this, other) {
if match (&this.kind, &other.kind) {
(TokenKind::Literal(this), TokenKind::Literal(other)) => {
SpanlessEq::eq(this, other)
Expand Down Expand Up @@ -643,10 +643,13 @@ fn doc_comment<'a>(
AttrStyle::Inner => true,
} {
match trees.next() {
Some(TokenTree::Token(Token {
kind: TokenKind::Not,
span: _,
})) => {}
Some(TokenTree::Token(
Token {
kind: TokenKind::Not,
span: _,
},
_spacing,
)) => {}
_ => return false,
}
}
Expand All @@ -656,21 +659,27 @@ fn doc_comment<'a>(
};
let mut trees = stream.trees();
match trees.next() {
Some(TokenTree::Token(Token {
kind: TokenKind::Ident(symbol, false),
span: _,
})) if *symbol == sym::doc => {}
Some(TokenTree::Token(
Token {
kind: TokenKind::Ident(symbol, false),
span: _,
},
_spacing,
)) if *symbol == sym::doc => {}
_ => return false,
}
match trees.next() {
Some(TokenTree::Token(Token {
kind: TokenKind::Eq,
span: _,
})) => {}
Some(TokenTree::Token(
Token {
kind: TokenKind::Eq,
span: _,
},
_spacing,
)) => {}
_ => return false,
}
match trees.next() {
Some(TokenTree::Token(token)) => {
Some(TokenTree::Token(token, _spacing)) => {
is_escaped_literal_token(token, unescaped) && trees.next().is_none()
}
_ => false,
Expand Down

0 comments on commit fadc8e9

Please sign in to comment.