Skip to content

Fixed documentation for finalize->drop change #7516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -2879,14 +2879,12 @@ The kinds are:
Types with destructors (types that implement `Drop`) can not implement `Copy`.
`Drop`
: This is not strictly a kind, but its presence interacts with kinds: the `Drop`
trait provides a single method `finalize` that takes no parameters, and is run
trait provides a single method `drop` that takes no parameters, and is run
when values of the type are dropped. Such a method is called a "destructor",
and are always executed in "top-down" order: a value is completely destroyed
before any of the values it owns run their destructors. Only `Send` types
that do not implement `Copy` can implement `Drop`.

> **Note:** The `finalize` method may be renamed in future versions of Rust.

_Default_
: Types with destructors, closure environments,
and various other _non-first-class_ types,
Expand Down