-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
using generic functions with a foreign ABI doesn't work #10353
Comments
I'm wondering if that assertion can just be removed. Are there any fundamental problems with generics with foreign ABI? I can't think of any. (cc @pcwalton @nikomatsakis ?) |
Generic functions will be called differently for every type, and that doesn't map to C except in some limited circumstances. This could rather be a proper compiler error - I'm kind of surprised this bug still exists. |
@brson: It's useful to be able to write a generic function and obtain function pointers to specific monomorphized instances though. It should be possible to do this and ask that the function use the C ABI. |
@cmr: it's definitely not as simple as removing the assertion |
Nominating. |
Current thinking is to put in a proper error message now (as in, don't add support in the short term for 1.0). Then post 1.0 we can backward-compatibly extend rustc to add support for this. Accepted for P-high for the error message. |
taking, for the error message |
There's no ICE anymore, but this is still an issue. |
Eh, opening a new issue. |
Change unusual_byte_groupings to require byte groupings of equal size Fixes issue rust-lang#6556 This lint required byte groupings of size 2 or 4 for `Radix::Binary` and `Radix::Hexadecimal`. Since there are good reasons for allowing groups of other sizes, this PR relaxes the restriction. This lint now requires that - group sizes after the first group be of the same size and - greater or equal in size to the first group. --- changelog: [`unusual_byte_groupings`]: reduce false positives by relaxing restriction requiring groups of specific sizes.
Use case, if you're curious: https://github.com/thestinger/rust-core/blob/master/core/thread.rs#L30
The text was updated successfully, but these errors were encountered: