Skip to content

Allow parameter types to be omitted from closure expressions #2093

Closed
@nikomatsakis

Description

@nikomatsakis

We should allow you to write fn&(x, y) and infer the types for x and y just as we now infer the types for {|x, y|...}. Similarly we should infer the return type too---not sure whether we should require something like fn&(x, y) -> { ... } in that case, though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-grammarArea: The grammar of RustA-type-systemArea: Type systemC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions