Skip to content

Forbid destructors on objects that aren't 'static bounded #11406

Closed
@pcwalton

Description

@pcwalton

There is a problem with destruction of arenas. Objects in an arena can freely point to other objects in the arena. While an object is being destroyed, it can therefore access any other arbitrary object in the arena, including objects that were already destroyed. This can cause badness.

To me the easiest fix seems to be to require that objects with destructors be 'static bounded.

cc @nikomatsakis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions