diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-16 05:22:30 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-04-16 05:22:30 +0000 |
| commit | a1f523dd2c2f50c434d750f4957fc1825ea1753e (patch) | |
| tree | d79a686c4d2bc3b3def6b1a8ccb2a19a4ddc463b /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 20f418252f2a207abca10a83ed2b04cb0b7aa57c (diff) | |
| parent | 6288a721f5ea59a59b4304a7b70c92d7755e8aa8 (diff) | |
| download | rust-a1f523dd2c2f50c434d750f4957fc1825ea1753e.tar.gz rust-a1f523dd2c2f50c434d750f4957fc1825ea1753e.zip | |
Merge from rustc
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); |
