rustc_ast: Harmonize delimiter naming with proc_macro::Delimiter

This commit is contained in:
Vadim Petrochenkov
2022-04-26 15:40:14 +03:00
parent 0e7915d11f
commit 2733ec1be3
41 changed files with 433 additions and 426 deletions

View File

@@ -8,7 +8,7 @@ use crate::placeholders::{placeholder, PlaceholderExpander};
use rustc_ast as ast;
use rustc_ast::mut_visit::*;
use rustc_ast::ptr::P;
use rustc_ast::token;
use rustc_ast::token::{self, Delimiter};
use rustc_ast::tokenstream::TokenStream;
use rustc_ast::visit::{self, AssocCtxt, Visitor};
use rustc_ast::{AssocItemKind, AstLike, AstLikeWrapper, AttrStyle, ExprKind, ForeignItemKind};
@@ -884,7 +884,7 @@ pub fn parse_ast_fragment<'a>(
AstFragmentKind::Stmts => {
let mut stmts = SmallVec::new();
// Won't make progress on a `}`.
while this.token != token::Eof && this.token != token::CloseDelim(token::Brace) {
while this.token != token::Eof && this.token != token::CloseDelim(Delimiter::Brace) {
if let Some(stmt) = this.parse_full_stmt(AttemptLocalParseRecovery::Yes)? {
stmts.push(stmt);
}