diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-07 17:59:11 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-04-11 21:09:52 +0200 |
| commit | f9ca2135101831f9dc240201e3c0e807fa2d1b1b (patch) | |
| tree | 053afb4ae26766f842d8bac2d4a7c233cb7f1f83 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | df7daa815f4047a1cfe24ecfbc12cfd4f40fa928 (diff) | |
| download | rust-f9ca2135101831f9dc240201e3c0e807fa2d1b1b.tar.gz rust-f9ca2135101831f9dc240201e3c0e807fa2d1b1b.zip | |
remove some things that do not need to be
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 012285e4644..00947a4c585 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3585,8 +3585,7 @@ impl<'a> Parser<'a> { match self.expect_one_of(&[token::Comma], &[token::CloseDelim(close_delim)]) { Ok(_) => { - if let Some(f) = - parsed_field.or_else(|guar| field_ident(self, guar).ok_or(guar)).ok() + if let Ok(f) = parsed_field.or_else(|guar| field_ident(self, guar).ok_or(guar)) { // Only include the field if there's no parse error for the field name. fields.push(f); |
