aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-11-29 16:20:50 -0500
committerBrad Fitzpatrick <bradfitz@golang.org>2017-12-01 16:38:53 +0000
commit0c0c3c186b1c1a7d3bc9d8a4aaec24767b5bfa81 (patch)
treea6d8210172c4d0b948cd22305877cfc3e1b0d81b /src/sync
parent08176b28a3330c9f5c7b310dd400ffe3898ca739 (diff)
downloadgo-0c0c3c186b1c1a7d3bc9d8a4aaec24767b5bfa81.tar.xz
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>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/atomic/value.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/sync/atomic/value.go b/src/sync/atomic/value.go
index ac5a9a5e72..eab7e70c9b 100644
--- a/src/sync/atomic/value.go
+++ b/src/sync/atomic/value.go
@@ -14,8 +14,6 @@ import (
//
// A Value must not be copied after first use.
type Value struct {
- noCopy noCopy
-
v interface{}
}
@@ -86,13 +84,3 @@ func (v *Value) Store(x interface{}) {
// Disable/enable preemption, implemented in runtime.
func runtime_procPin()
func runtime_procUnpin()
-
-// noCopy may be embedded into structs which must not be copied
-// after the first use.
-//
-// See https://golang.org/issues/8005#issuecomment-190753527
-// for details.
-type noCopy struct{}
-
-// Lock is a no-op used by -copylocks checker from `go vet`.
-func (*noCopy) Lock() {}