Skip to content

drop could take self by-value, and allow early destruction #4330

Closed
@thestinger

Description

@thestinger

There's currently a util::ignore function that consumes a value to destroy it early.

It would be nicer the if Drop trait's drop method took self by value and could be called early, which would require some compiler magic to avoid an infinite destruction cycle in the drop method. This would also allow drop to move out of self, which is potentially useful.

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