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

replace empty destructors with NonCopyable #7427

Closed
thestinger opened this issue Jun 27, 2013 · 2 comments
Closed

replace empty destructors with NonCopyable #7427

thestinger opened this issue Jun 27, 2013 · 2 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@thestinger
Copy link
Contributor

The NonCopyable unit struct is now zero-size via #[unsafe_no_drop_flag], so it's the cleanest way to do this.

This could potentially be a lint warning, with a suggestion.

@bstrie
Copy link
Contributor

bstrie commented Jul 15, 2013

A lint for empty drops is probably unnecessary, I wouldn't imagine that would be a common idiom once NonCopyable is well-known.

@brson
Copy link
Contributor

brson commented Oct 18, 2013

I only see one of these, in libsyntax.

reedlepee123 added a commit to reedlepee123/rust that referenced this issue Oct 29, 2013
reedlepee123 added a commit to reedlepee123/rust that referenced this issue Oct 29, 2013
reedlepee123 added a commit to reedlepee123/rust that referenced this issue Oct 29, 2013
@bors bors closed this as completed in 83cdae6 Oct 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

No branches or pull requests

3 participants