Skip to content

fn should coerce to unsafe fn #1762

Closed
Closed
@cramertj

Description

@cramertj

Unsafe functions are a strict super-set of safe functions. It seems like fns should freely coerce to the unsafe fn of the appropriate type (i.e. fn() -> () to unsafe fn() -> ()). See this playground link for an example. Is there any particular reason not to allow this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions