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

rustc panic with manual Fn implementation #39163

Closed
ghost opened this issue Jan 18, 2017 · 4 comments
Closed

rustc panic with manual Fn implementation #39163

ghost opened this issue Jan 18, 2017 · 4 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@ghost
Copy link

ghost commented Jan 18, 2017

I was attempting to implement Fn manually, possibly incorrectly!

I tried this code:
Playground URL: https://play.rust-lang.org/?gist=0c4c814bd6fe031a33f6673c27de9239&version=nightly&backtrace=0
Gist URL: https://gist.github.com/0c4c814bd6fe031a33f6673c27de9239

Meta

error: internal compiler error: /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_trans/abi.rs:374: argument to function with "rust-call" ABI is not a tuple

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

thread 'rustc' panicked at 'Box', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustc_errors/lib.rs:423
note: Run with RUST_BACKTRACE=1 for a backtrace.

@durka
Copy link
Contributor

durka commented Jan 18, 2017

It is incorrect, you need to use a tuple: https://is.gd/0lhHva

That said it should not ICE.

@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 18, 2017
@ghost
Copy link
Author

ghost commented Jan 18, 2017

Thanks, I have added the tuples since posting. I've also found that this is probably a duplicate of #21139 and #22565.

@durka
Copy link
Contributor

durka commented Jan 18, 2017

Yes, dupe of #22565.

@Mark-Simulacrum
Copy link
Member

Closing in favor of #22565.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants