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

Generic foreign functions are not allowed #12502

Closed
emberian opened this issue Feb 23, 2014 · 0 comments · Fixed by #15831
Closed

Generic foreign functions are not allowed #12502

emberian opened this issue Feb 23, 2014 · 0 comments · Fixed by #15831

Comments

@emberian
Copy link
Member

#10353 was about the ICE, but now that that has been patched up, we should add this feature.

bors added a commit that referenced this issue Aug 7, 2014
This allows for things like this:

    extern "C" fn callback<T>(t: T) { /* ... */ }
    extern "C" {
        fn take_callback(c: extern fn(i32));
    }

and later:

    take_callback(callback::<i32>);

Closes #12502.
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2024
…r=Alexendoo

`assigning_clones` should respect MSRV

Fixes: rust-lang#12502

This PR fixes the `assigning_clones` lint suggesting to use `clone_from` or `clone_into` on incompatible MSRVs.

`assigning_clones` will suggest using either `clone_from` or `clone_into`, both of which were stabilized in 1.63. If the current MSRV is below 1.63, the lint should not trigger.

changelog: [`assigning_clones`]: don't lint when the MSRV is below 1.63.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant