We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6713dde commit 9fcb9c6Copy full SHA for 9fcb9c6
compiler/rustc_parse/src/parser/expr.rs
@@ -3012,7 +3012,7 @@ impl<'a> Parser<'a> {
3012
}
3013
};
3014
3015
- 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);
3016
// A shorthand field can be turned into a full field with `:`.
3017
// We should point this out.
3018
self.check_or_expected(!is_shorthand, TokenType::Token(token::Colon));
0 commit comments