Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors authored Nov 6, 2022
1 parent 4b77e73 commit 28d82dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2880,7 +2880,7 @@ impl<'a> Parser<'a> {
};

while self.token != token::CloseDelim(close_delim) {
if self.eat(&token::DotDot) || self.recover_struct_fileds_dots(close_delim) {
if self.eat(&token::DotDot) || self.recover_struct_field_dots(close_delim) {
let exp_span = self.prev_token.span;
// We permit `.. }` on the left-hand side of a destructuring assignment.
if self.check(&token::CloseDelim(close_delim)) {
Expand Down Expand Up @@ -3027,7 +3027,7 @@ impl<'a> Parser<'a> {
self.recover_stmt();
}

fn recover_struct_fileds_dots(&mut self, close_delim: Delimiter) -> bool {
fn recover_struct_field_dots(&mut self, close_delim: Delimiter) -> bool {
if !self.look_ahead(1, |t| *t == token::CloseDelim(close_delim))
&& self.eat(&token::DotDotDot)
{
Expand Down

0 comments on commit 28d82dd

Please sign in to comment.