1
Fork 0

rename unmatched_braces to unmatched_delims

This commit is contained in:
yukang 2023-02-21 14:51:19 +00:00
parent 65ad5f8de7
commit 9ce7472db4
6 changed files with 27 additions and 26 deletions

View file

@ -31,7 +31,7 @@ use unescape_error_reporting::{emit_unescape_error, escaped_char};
rustc_data_structures::static_assert_size!(rustc_lexer::Token, 12);
#[derive(Clone, Debug)]
pub struct UnmatchedBrace {
pub struct UnmatchedDelim {
pub expected_delim: Delimiter,
pub found_delim: Option<Delimiter>,
pub found_span: Span,
@ -44,7 +44,7 @@ pub(crate) fn parse_token_trees<'a>(
mut src: &'a str,
mut start_pos: BytePos,
override_span: Option<Span>,
) -> (PResult<'a, TokenStream>, Vec<UnmatchedBrace>) {
) -> (PResult<'a, TokenStream>, Vec<UnmatchedDelim>) {
// Skip `#!`, if present.
if let Some(shebang_len) = rustc_lexer::strip_shebang(src) {
src = &src[shebang_len..];