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> {
871
871
) -> hir:: ExprKind < ' hir > {
872
872
// Return early in case of an ordinary assignment.
873
873
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 ( ..) => { }
876
878
_ => {
877
879
return hir:: ExprKind :: Assign (
878
880
self . lower_expr ( lhs) ,
@@ -959,7 +961,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
959
961
}
960
962
// structs:
961
963
// FIXME: support `..` here, requires changes to the parser
962
- ExprKind :: Struct ( path, fields, _rest ) => {
964
+ ExprKind :: Struct ( path, fields, None ) => {
963
965
let field_pats = self . arena . alloc_from_iter ( fields. iter ( ) . map ( |f| {
964
966
let pat = self . destructure_assign ( & f. expr , eq_sign_span, assignments) ;
965
967
hir:: FieldPat {
You can’t perform that action at this time.
0 commit comments