Skip to content

Calling native functions that take enums by value is broken #2334

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

Closed
brson opened this issue May 3, 2012 · 6 comments
Closed

Calling native functions that take enums by value is broken #2334

brson opened this issue May 3, 2012 · 6 comments
Labels
A-codegen Area: Code generation

Comments

@brson
Copy link
Contributor

brson commented May 3, 2012

Since switching to named structs for enums we can no longer generate code for native functions that take by-val enums because we don't handle the LLVM array type correctly in native.rs. I added some hacks to get servo building again (which uses the c_void type in some signatures), but there is a big FIXME in native.rs that says "I HAVE NO IDEA WHAT I AM DOING THIS MUST BE WRONG" in fn classify, and run-pass/native-struct is xfailed on win32.

@ghost ghost assigned marijnh May 3, 2012
@brson
Copy link
Contributor Author

brson commented May 3, 2012

@crabtw contributed a fix in bdebe92 but the native-struct test case still is broken.

@Aatch
Copy link
Contributor

Aatch commented Jun 7, 2013

Can we check to see if this is still broken?

@Blei
Copy link
Contributor

Blei commented Jun 7, 2013

(That test is now in run-pass/foreign-struct.rs)

@graydon
Copy link
Contributor

graydon commented Aug 1, 2013

My guess is that one of the patches @nikomatsakis landed such as efc7f82 may have fixed this. I'm not sure it's fixed but we can certainly generate code for it now. @brson : do you remember how it was broken? did it just not compile, or crash, or .. ?

@graydon
Copy link
Contributor

graydon commented Aug 1, 2013

(I just tested it and it compiles and runs on windows)

@graydon
Copy link
Contributor

graydon commented Aug 1, 2013

Filed #8173 to close this.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
This test is flaky in CI; removing until we can diagnose and fix the failure.
tshepang pushed a commit to tshepang/rust that referenced this issue Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation
Projects
None yet
Development

No branches or pull requests

5 participants