Skip to content

Commit 9fcb9c6

Browse files
Update compiler/rustc_parse/src/parser/expr.rs
Co-authored-by: Vadim Petrochenkov <[email protected]>
1 parent 6713dde commit 9fcb9c6

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-1
lines changed

compiler/rustc_parse/src/parser/expr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3012,7 +3012,7 @@ impl<'a> Parser<'a> {
30123012
}
30133013
};
30143014

3015-
let is_shorthand = parsed_field.as_ref().map_or(false, |f| f.ident.span == f.expr.span);
3015+
let is_shorthand = parsed_field.as_ref().map_or(false, |f| f.is_shorthand);
30163016
// A shorthand field can be turned into a full field with `:`.
30173017
// We should point this out.
30183018
self.check_or_expected(!is_shorthand, TokenType::Token(token::Colon));

0 commit comments

Comments
 (0)