-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add a noCopy struct so go vet
complains about copying widgets
#5520
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, but the utility type should be at the end of the file (or at least after the public types)
I think it is common practice to have it at the top actually. IIRC, there might be cases where the compile makes the type bigger by adding padding when having a zero size type at the end of the struct. |
Oh, sorry. I read that comment incorrectly. I thought you said bottom of the struct. My bad :/ |
Description:
Pre-2.6 we had an actual lock in BaseWidget so we got this warning "for free". Adding back a dummy
sync.Locker
implementation so we can still warn if widget structs are copied or passed by value.For #4654
Checklist: