From 6401022bc8e629ca34ba9851648e41317878ed24 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 3 Aug 2021 16:53:45 -0400 Subject: [PATCH] don't take the address of a range variable --- internal/refactoring/move_execute.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/refactoring/move_execute.go b/internal/refactoring/move_execute.go index 26eef65c02..011fc9f640 100644 --- a/internal/refactoring/move_execute.go +++ b/internal/refactoring/move_execute.go @@ -148,9 +148,9 @@ func ApplyMoves(stmts []MoveStatement, state *states.State) map[addrs.UniqueKey] // may contain cycles and other sorts of invalidity. func buildMoveStatementGraph(stmts []MoveStatement) *dag.AcyclicGraph { g := &dag.AcyclicGraph{} - for _, stmt := range stmts { + for i := range stmts { // The graph nodes are pointers to the actual statements directly. - g.Add(&stmt) + g.Add(&stmts[i]) } // Now we'll add the edges representing chaining and nesting relationships.