Skip to content

Multiple extern fn with same name should not error out #28870

Closed
@nagisa

Description

@nagisa

See #16403 (comment) and that issue in general.

Currently for each extern fn we generate a rust ABI function containing function body and a C ABI trampoline to the rust function. However we do not mangle the rust ABI function sufficiently, therefore this code does not compile:

fn main() {
    { extern fn a() {this} };
    { extern fn a() {that} };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions