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

baffling error: "expected fn() -> native but found fn() -> native (types differ)" #1029

Closed
elly opened this issue Oct 12, 2011 · 2 comments
Closed
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@elly
Copy link
Contributor

elly commented Oct 12, 2011

Test case at http://www.leptoquark.net/~elly/ncurses-question-t.tar produces the following output when compiled:

./ncurses.rs:33:37: 33:52 error: mismatched types: expected fn() -> native but found fn() -> native (types differ)
./ncurses.rs:33 fn keypad(v : int) { _native::keypad(_native::stdscr, v); }
^~~~~~~~~~~~~~~
error: aborting due to previous errors
rt: ---
rt: c6da:main:main: upcall fail 'explicit failure', ../src/comp/driver/session.rs:67
rt: c6da:main: domain main @0x9097718 root task failed
make: *** [libncurses.so] Error 101

Error messages claiming that x != x should be illegal :).

@marijnh
Copy link
Contributor

marijnh commented Oct 12, 2011

The native type is different, but all native types are currently printed the same way.

@marijnh
Copy link
Contributor

marijnh commented Jan 26, 2012

This no longer happens.

@marijnh marijnh closed this as completed Jan 26, 2012
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
…g#1029)

* Add support to mim_specialization for arbitrary / invariant

We would like to enable users to provide custom implementations of
Invariant and Arbitrary. Use feature `min_specialization` to allow that.
Note that users will also need to enable that same feature in their
code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

2 participants