@@ -816,7 +816,7 @@ impl<'tcx> DumpVisitor<'tcx> {
816816 path : & ' tcx hir:: QPath < ' tcx > ,
817817 fields : & ' tcx [ hir:: Field < ' tcx > ] ,
818818 variant : & ' tcx ty:: VariantDef ,
819- base : Option < & ' tcx hir :: Expr < ' tcx > > ,
819+ rest : & ' tcx StructRest ,
820820 ) {
821821 if let Some ( struct_lit_data) = self . save_ctxt . get_expr_data ( ex) {
822822 if let hir:: QPath :: Resolved ( _, path) = path {
@@ -836,7 +836,9 @@ impl<'tcx> DumpVisitor<'tcx> {
836836 }
837837 }
838838
839- walk_list ! ( self , visit_expr, base) ;
839+ if let StructRest :: Base ( base) = rest {
840+ self . visit_expr ( base) ;
841+ }
840842 }
841843
842844 fn process_method_call (
@@ -1399,7 +1401,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
13991401 debug ! ( "visit_expr {:?}" , ex. kind) ;
14001402 self . process_macro_use ( ex. span ) ;
14011403 match ex. kind {
1402- hir:: ExprKind :: Struct ( ref path, ref fields, ref base ) => {
1404+ hir:: ExprKind :: Struct ( ref path, ref fields, ref rest ) => {
14031405 let hir_expr = self . save_ctxt . tcx . hir ( ) . expect_expr ( ex. hir_id ) ;
14041406 let adt = match self . save_ctxt . typeck_results ( ) . expr_ty_opt ( & hir_expr) {
14051407 Some ( ty) if ty. ty_adt_def ( ) . is_some ( ) => ty. ty_adt_def ( ) . unwrap ( ) ,
@@ -1409,7 +1411,7 @@ impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
14091411 }
14101412 } ;
14111413 let res = self . save_ctxt . get_path_res ( hir_expr. hir_id ) ;
1412- self . process_struct_lit ( ex, path, fields, adt. variant_of_res ( res) , * base )
1414+ self . process_struct_lit ( ex, path, fields, adt. variant_of_res ( res) , rest )
14131415 }
14141416 hir:: ExprKind :: MethodCall ( ref seg, _, args, _) => {
14151417 self . process_method_call ( ex, seg, args)
0 commit comments