Skip to content

Disallow duplicated extern declarations #12707

Open
@klutzy

Description

@klutzy
mod a {
    extern {
        fn func();
    }
}

mod b {
    extern {
        fn func(i: i8); // different signature
    }
}

Currently rustc accepts this, but I think it should be disallowed to reduce potential mistakes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FFIArea: Foreign function interface (FFI)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions