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

Internal compiler error when trying to spawn a native function as a task #506

Closed
robarnold opened this issue Jun 16, 2011 · 6 comments
Closed

Comments

@robarnold
Copy link
Contributor

I see 'internal compiler error ret_ty_of_fn_ty() called on non-function type' when trying to compile:

native "rust" mod rustrt {
fn uvtask();
}
fn iotask() {
let task iothread = spawn rustrt::uvtask();
}

@eholk
Copy link
Contributor

eholk commented Jun 16, 2011

Does this repro when you wrap rustrt::uvtask in a rust function?

@robarnold
Copy link
Contributor Author

No, that was my workaround.

@ghost ghost assigned eholk Jun 16, 2011
@eholk
Copy link
Contributor

eholk commented Jun 16, 2011

I asked pcwalton about this in IRC. He said we just need to make the alt inside ret_ty_of_fn_ty handle ty_native_fn too. It should be a pretty simple fix.

@eholk
Copy link
Contributor

eholk commented Jun 16, 2011

Rob, when you get the chance, can you see if this patch fixes the problem for you?

https://gist.github.com/1029944

@robarnold
Copy link
Contributor Author

Sorry for the delay here. It seems like it should fix the issue but it doesn't. Here is my reduced test case: https://gist.github.com/1034937

@eholk
Copy link
Contributor

eholk commented Jun 20, 2011

Thanks for reducing this test case! I'll see if I can get this bug fixed today.

@eholk eholk closed this as completed in 5640bea Jun 20, 2011
eholk pushed a commit that referenced this issue Jun 20, 2011
@eholk eholk closed this as completed in 9921536 Jun 20, 2011
arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
Give pre-RFC suggestions and clarify PR process
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
* Add initial version of contributing guide.
* Highlight the preferential usage of the Enzyme compiler explorer to explore bugs and issues.
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

No branches or pull requests

2 participants