Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: NoCopy no longer works #34278

Closed
RaduBerinde opened this issue Jan 27, 2019 · 1 comment
Closed

util: NoCopy no longer works #34278

RaduBerinde opened this issue Jan 27, 2019 · 1 comment
Labels
A-testing Testing tools and infrastructure C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-productivity Severe issues that impede the productivity of CockroachDB developers.

Comments

@RaduBerinde
Copy link
Member

util.NoCopy is supposed to trigger the linter on by-value copies. I put it in a structure and had no problem doing copy := *x.

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-productivity Severe issues that impede the productivity of CockroachDB developers. A-testing Testing tools and infrastructure labels Jan 27, 2019
@knz
Copy link
Contributor

knz commented Jan 27, 2019

cc @petermattis

petermattis added a commit to petermattis/cockroach that referenced this issue Jan 28, 2019
Vet now requires that `NoCopy` structure has both `Lock` and `Unlock`
methods.

Name `NoCopy` members with an underscore. This avoids a (new?) warning
about these members being unused.

Fixes cockroachdb#34278

Release note: None
craig bot pushed a commit that referenced this issue Jan 28, 2019
34280: util: fix NoCopy on go1.11 and later r=RaduBerinde a=petermattis

Vet now requires that `NoCopy` structure has both `Lock` and `Unlock`
methods.

Fixes #34278

Release note: None

34285: storage: test raft log decision input's MaxLogSize r=petermattis a=tbg

See #34284.

Release note: None

Co-authored-by: Peter Mattis <[email protected]>
Co-authored-by: Tobias Schottdorf <[email protected]>
@craig craig bot closed this as completed in #34280 Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Testing tools and infrastructure C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-productivity Severe issues that impede the productivity of CockroachDB developers.
Projects
None yet
Development

No branches or pull requests

2 participants