-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
extern "C"
functions don't implement Clone
#24161
Labels
A-type-system
Area: Type system
Comments
|
Looking at the source it's actually explicitly implemented on |
lilyball
added a commit
to lilyball/rust
that referenced
this issue
Apr 7, 2015
We only implemented Clone on `extern "Rust" fn`s (for up to 8 parameters). This didn't cover `extern "C"` or `unsafe` (or `unsafe extern "C"`) `fn`s, but there's no reason why they shouldn't be cloneable as well. The new impls are marked unstable because the existing impl for `extern "Rust" fn`s is. Fixes rust-lang#24161.
bors
added a commit
that referenced
this issue
Apr 9, 2015
…crichton We only implemented Clone on `extern "Rust" fn`s (for up to 8 parameters). This didn't cover `extern "C"` or `unsafe` (or `unsafe extern "C"`) `fn`s, but there's no reason why they shouldn't be cloneable as well. The new impls are marked unstable because the existing impl for `extern "Rust" fn`s is. Fixes #24161.
That was quick, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should compile. It used to compile without deriving
Clone
, and it currently compiles ifextern "C"
is removed.The text was updated successfully, but these errors were encountered: