Skip to content

Documentation for mem::forget implies that it may invalidate raw pointers to heap allocations #320

Open
@pnkfelix

Description

@pnkfelix

(Transferred from rust-lang/rust#79320 )

Someone pointed out that the documentation for mem::forget may be a bit too broad, in that it could be interpreted as saying that heap allocations owned by a value passed to mem::forget may be invalidated.

I think the UCG WG is currently the best group of people to work out precisely what the rules are here, and what the best mental model is, (if you haven't already, that is).

I'm closing rust-lang/rust#79320 because I don't think the work will be tracked usefully in that context.

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