title: Nocopy minimal example?
body: <p>I've been trying to get a <code>noCopy</code> directive to work for one of my own structs, but I cannot get <code>go vet</code> to detect it. </p>
  
  <p>I can get it to detect copying of <code>sync.WaitGroup</code>, and <code>sync.Mutex</code>, but not my own struct. <a href="https://golang.org/src/cmd/vet/testdata/copylock.go" rel="noreferrer">This test file</a> in the vet source doesn't even trigger with my <code>go vet</code>. </p>
  
  <p>Or well, it finds some of the errors:</p>
  
  <pre><code># command-line-arguments
  ./govet.go:56:6: no new variables on left side of :=
  ./govet.go:110:17: unsafe.Sizeof(mu) evaluated but not used
  ./govet.go:111:18: unsafe.Sizeof(mu) evaluated but not used
  ./govet.go:112:10: unsafe.Sizeof(mu) evaluated but not used
  </code></pre>
  
  <p>but the copylock detection doesn't find anything.</p>
  
  <p>Did something change in <code>go vet</code> since <a href="https://github.com/golang/go/issues/8005#issuecomment-190753527" rel="noreferrer">this discussion</a> at 1.4? I'm running <code>go version go1.11 darwin/amd64</code>.</p>