code: private void wrapAssignmentInCallToArrow(NodeTraversal t, Node assignment) {
      String tempVarName = getTempVariableName();
      Node tempVarModel = astFactory.createName(tempVarName, assignment.getJSType());
      Node rhs = assignment.getLastChild().detach();
      // let temp0 = rhs;
      Node newAssignment = IR.let(tempVarModel.cloneNode(), rhs);
      NodeUtil.addFeatureToScript(t.getCurrentScript(), Feature.LET_DECLARATIONS);
      // [x, y] = temp0;
      Node replacementExpr =
          astFactory.createAssign(assignment.getFirstChild().detach(), tempVarModel.cloneNode());
      Node exprResult = IR.exprResult(replacementExpr);
      // return temp0;
      Node returnNode = IR.returnNode(tempVarModel.cloneNode());
  
      // Create a function to hold these assignments:
      Node block = IR.block(newAssignment, exprResult, returnNode);
      Node arrowFn = astFactory.createZeroArgFunction(/* name= */ "", block, assignment.getJSType());
      arrowFn.setIsArrowFunction(true);
  
      // Create a call to the function, and replace the pattern with the call.
      Node call = astFactory.createCall(arrowFn);
      NodeUtil.addFeatureToScript(t.getCurrentScript(), Feature.ARROW_FUNCTIONS);
      call.useSourceInfoIfMissingFromForTree(assignment);
      call.putBooleanProp(Node.FREE_CALL, true);
      assignment.getParent().replaceChild(assignment, call);
      NodeUtil.markNewScopesChanged(call, compiler);
      replacePattern(
          t,
          replacementExpr.getFirstChild(),
          replacementExpr.getLastChild(),
          replacementExpr,
          exprResult);
    }
docs: Convert the assignment '[x, y] = rhs' that is used as an expression and not an expr result to:
  (() => let temp0 = rhs; var temp1 = $jscomp.makeIterator(temp0); var x = temp0.next().value;
  var y = temp0.next().value; return temp0; }) And the assignment '{x: a, y: b} = rhs' used as an
  expression and not an expr result to: (() => let temp0 = rhs; var temp1 = temp0; var a =
  temp0.x; var b = temp0.y; return temp0; })