File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
compiler/rustc_ast_lowering/src Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -871,8 +871,10 @@ impl<'hir> LoweringContext<'_, 'hir> {
871871 ) -> hir:: ExprKind < ' hir > {
872872 // Return early in case of an ordinary assignment.
873873 match lhs. kind {
874- ExprKind :: Array ( ..) | ExprKind :: Call ( ..) | ExprKind :: Struct ( ..) | ExprKind :: Tup ( ..) => {
875- }
874+ ExprKind :: Array ( ..)
875+ | ExprKind :: Call ( ..)
876+ | ExprKind :: Struct ( _, _, None )
877+ | ExprKind :: Tup ( ..) => { }
876878 _ => {
877879 return hir:: ExprKind :: Assign (
878880 self . lower_expr ( lhs) ,
@@ -959,7 +961,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
959961 }
960962 // structs:
961963 // FIXME: support `..` here, requires changes to the parser
962- ExprKind :: Struct ( path, fields, _rest ) => {
964+ ExprKind :: Struct ( path, fields, None ) => {
963965 let field_pats = self . arena . alloc_from_iter ( fields. iter ( ) . map ( |f| {
964966 let pat = self . destructure_assign ( & f. expr , eq_sign_span, assignments) ;
965967 hir:: FieldPat {
You can’t perform that action at this time.
0 commit comments