diff --git a/compiler/parser/src/parser/file.rs b/compiler/parser/src/parser/file.rs index 06ba5a5c9d..673ed2f554 100644 --- a/compiler/parser/src/parser/file.rs +++ b/compiler/parser/src/parser/file.rs @@ -66,11 +66,7 @@ impl ParserContext<'_> { fn unexpected_item(token: &SpannedToken, expected: &[Token]) -> ParserError { ParserError::unexpected( &token.token, - expected - .iter() - .map(|x| format!("'{x}'")) - .collect::>() - .join(", "), + expected.iter().map(|x| format!("'{x}'")).collect::>().join(", "), token.span, ) }