-
Notifications
You must be signed in to change notification settings - Fork 13.4k
A better way to denote noncopyable types #4069
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
Comments
There's also There may also be other solutions to this like:
|
Actually, with a default impl of finalize you could just write |
Changed issue title to be more general |
incidentally, it makes me queasy that |
This could also work, depending on what generic impls are legal
|
Now that we have |
Now that |
How to initialize a structure that contains an |
Although right now, unit structs are buggy and can't be constructed cross-crate. |
2013/7/5 Daniel Micay [email protected]
Yeah, that's what I apparently ran into. Thank you, |
…r_localtime_r localtime_r: deduplicate timezone name allocation
In the past the way to tell the compiler that a struct wasn't copyable was to stick an empty
drop {}
block at the end of it. This was hacky and non-obvious, but at least it was concise. But with the Drop trait this now expands toimpl Foo : Drop { fn finalize(&self) {} }
, which is rather unfortunate. A#[noncopyable]
attribute that expanded to the above would be clearer and less verbose.The text was updated successfully, but these errors were encountered: