Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

FAQ: update information on returning closures #1121

Open
@FranklinChen

Description

@FranklinChen

This replaces rust-lang/rust#51289

The closure must also be wrapped in a Box, so that it is allocated on the heap.

at https://www.rust-lang.org/en-US/faq.html#how-do-i-return-a-closure-from-a-function is no longer correct because now it is possible to return a closure without boxing it thanks to the ability to return impl Trait as of rust-lang/rust#49255

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions