diff options
Diffstat (limited to 'src/sync/atomic/type.go')
| -rw-r--r-- | src/sync/atomic/type.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sync/atomic/type.go b/src/sync/atomic/type.go index 4d466232f1..cc016833d1 100644 --- a/src/sync/atomic/type.go +++ b/src/sync/atomic/type.go @@ -41,9 +41,10 @@ var _ = &Pointer[int]{} // A Pointer is an atomic pointer of type *T. The zero value is a nil *T. type Pointer[T any] struct { - // Mention T in a field to disallow conversion between Pointer types. + // Mention *T in a field to disallow conversion between Pointer types. // See go.dev/issue/56603 for more details. - _ [0]T + // Use *T, not T, to avoid spurious recursive type definition errors. + _ [0]*T _ noCopy v unsafe.Pointer |
