diff options
| author | Michael Howell <michael@notriddle.com> | 2022-07-12 07:34:49 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-07-12 09:51:20 -0700 |
| commit | 9fcb9c6648331f372ee58ce4489d3d43a0723c59 (patch) | |
| tree | d7f226cf859b8c81a0283534850312f02f4b1872 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 6713dde898ef81042a51d940d36150c52cb697b6 (diff) | |
| download | rust-9fcb9c6648331f372ee58ce4489d3d43a0723c59.tar.gz rust-9fcb9c6648331f372ee58ce4489d3d43a0723c59.zip | |
Update compiler/rustc_parse/src/parser/expr.rs
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index f2765e4997c..52fefa2ebe5 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -3012,7 +3012,7 @@ impl<'a> Parser<'a> { } }; - let is_shorthand = parsed_field.as_ref().map_or(false, |f| f.ident.span == f.expr.span); + let is_shorthand = parsed_field.as_ref().map_or(false, |f| f.is_shorthand); // A shorthand field can be turned into a full field with `:`. // We should point this out. self.check_or_expected(!is_shorthand, TokenType::Token(token::Colon)); |
