Skip to content

{Rc,Arc}::new_cyclic documentation is insufficient #95672

Closed
@jdahlstrom

Description

@jdahlstrom

As I reported in the i.r-l.o prerelease thread, the documentation of the new(ly stabilized) Rc and Arc method new_cyclic could really use some elaboration before the 1.60 release.

I'm quite familiar with refcounting, strong/weak refs, etc. but just from the doc, I have no idea what problem the new method solves exactly, when I should use it, why the closure is needed, how the closure argument seems to come from "thin air", and what the closure should return.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions