We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a93bd0 commit b7e450bCopy full SHA for b7e450b
doc/next/3-tools.md
@@ -49,6 +49,15 @@ with no other arguments. Such calls are nearly always a mistake
49
as the value of `s` may contain the `%` symbol; use `fmt.Print` instead.
50
See [#60529](/issue/60529).
51
52
+<!-- go.dev/issue/66387 -->
53
+The existing `copylock` analyzer now reports a diagnostic when a
54
+variable declared in a 3-clause "for" loop such as
55
+`for i := iter(); done(i); i = next(i) { ... }` contains a `sync.Locker`,
56
+such as a `sync.Mutex`. [Go 1.22](/doc/go1.22#language) changed the behavior
57
+of these loops to create a new variable for each iteration, copying the
58
+value from the previous iteration; this copy operation is not safe for locks.
59
+See [#66387](/issue/66387).
60
+
61
### GOCACHEPROG
62
63
<!-- go.dev/issue/64876 -->
0 commit comments