Skip to content

Missing type error on function pointers with different ABIs #2034

@philberty

Description

@philberty

I tried this code: https://github.com/rust-lang/rust/blob/aa3ca1994904f2e056679fce1f185db8c7ed2703/src/test/ui/issue-10764.rs

fn f(_: extern "Rust" fn()) {}
extern fn bar() {}

fn main() { f(bar) }
//~^ ERROR mismatched types

I expected to see this happen: //~^ ERROR mismatched types

Instead, this happened:

<source>:1:9: error: unknown ABI option
    1 | fn f(_: extern "Rust" fn()) {}
      |         ^~~~~~

Meta

  • What version of Rust GCC were you using, git sha if possible. be27571

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions