Skip to content

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

Closed

Description

@elly

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 :).

Activity

  1. marijnh commented on Oct 12, 2011

    @marijnh
    Contributor

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

  2. marijnh commented on Jan 26, 2012

    @marijnh
    Contributor

    This no longer happens.

  3. added 2 commits that reference this issue on Aug 21, 2026
  4. added a commit that references this issue on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions