Adopt let else in more places
This commit is contained in:
parent
b8c56fa8c3
commit
2ef8af6619
132 changed files with 539 additions and 881 deletions
|
@ -1667,9 +1667,8 @@ impl<'a> Parser<'a> {
|
|||
Err(LitError::NotLiteral) => None,
|
||||
Err(err) => {
|
||||
let span = token.span;
|
||||
let lit = match token.kind {
|
||||
token::Literal(lit) => lit,
|
||||
_ => unreachable!(),
|
||||
let token::Literal(lit) = token.kind else {
|
||||
unreachable!();
|
||||
};
|
||||
self.bump();
|
||||
self.report_lit_error(err, lit, span);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue