Skip to content

Coercing bare fn to &fn is inconsistent in statics. #5216

Closed
@jld

Description

@jld

This types:

fn f() { }
struct S(&fn());
pub static C: S = S(f);

This doesn't:

fn f() { }
type T = &fn();
pub static C: T = f;

This seems wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions