Skip to content

Feature request: emit Fn impls for functions #1101

@Nadrieril

Description

@Nadrieril

Functions and function pointers can be used where closures are expected:

self.partial_cmp(other).is_some_and(Ordering::is_gt)

he way this works is that every function item is assigned a unique (unnameable) type, and that type implements the Fn traits. This impl is a builtin impl, today, it would be nice to emit a real impl instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-helpIssues where non-expert help is needed and instructions have been given.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions