-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 extern fns (former crust functions) cause an ICE #3171
Comments
I expect this will work out fine once they have proper types. |
Not critical for 0.6; removing milestone |
Reproduced with 0252c30. Nominating for milestone 5, production-ready. |
these are not foreign, they're callbacks-to-rust. title's wrong. |
accepted for production-ready milestone |
@pcwalton @catamorphism do you have a testcase? |
As requested by @jdm when he closed my dupe of this (sorry about that), here's a bit of code that reproduces the ICE on the current master: fn with_type_params<T>() { }
extern fn foo<T>() {
with_type_params::<T>();
}
fn main() {
let _a:*u8 = foo;
} Not that this should actually compile, since it's trying to the generic A question: if this bug gets fixed, is it expected that this code would work if |
cc #10353 |
accepted for P-backcompat-lang (under assumption we will just disallow this construction). |
Closed by 8f3f666 |
normalize_doc_attributes: remove whitespace from the doc comment opener
Addresses the new `AggregateKind::RawPtr` added in rust-lang#123840. Resolves rust-lang#3161 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Co-authored-by: Kareem Khazem <[email protected]> Co-authored-by: Michael Tautschnig <[email protected]>
This is because they're
*u8
, so trans sees no substs and it won't monomorphize it. Then it callstype_of
on a ty param and ICEs.I think maybe crust functions should have to have explicit type parameter substitutions.
The text was updated successfully, but these errors were encountered: