Skip to content

Confusing error message with unsafe functions in extern blocks #27361

Closed
@kirillkh

Description

@kirillkh

This code produces "error: expected one of fn, pub, static, or unsafe, found unsafe":

extern { unsafe fn foo(); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions