Skip to content

extern fn type declarations and extern fn bindings should both default to the same ABI. #9309

Closed
@brson

Description

@brson

This has confused me several times:

fn main() {
    extern {
        // extern "C"
        fn foo();
    }

    // extern "Rust"
    let f: extern fn() = foo; // error
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions