]> Cypherpunks repositories - gostls13.git/commit
sync/atomic: remove noCopy from Value
authorRuss Cox <rsc@golang.org>
Wed, 29 Nov 2017 21:20:50 +0000 (16:20 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 1 Dec 2017 16:38:53 +0000 (16:38 +0000)
commit0c0c3c186b1c1a7d3bc9d8a4aaec24767b5bfa81
treea6d8210172c4d0b948cd22305877cfc3e1b0d81b
parent08176b28a3330c9f5c7b310dd400ffe3898ca739
sync/atomic: remove noCopy from Value

Values must not be copied after the first use.

Using noCopy makes vet complain about copies
even before the first use, which is incorrect
and very frustrating.

Drop it.

Fixes #21504.

Change-Id: Icd3a5ac3fe11e84525b998e848ed18a5d996f45a
Reviewed-on: https://go-review.googlesource.com/80836
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/vet/testdata/copylock.go
src/sync/atomic/value.go