rust-lang / rust-lang/nomicon

Talk about `ManuallyDrop` in "Destructors"

Open
#201 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
CSS
Stars
2.3k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

The "Destructors" chapter end with :

However, in the future we expect there to be a first-class way to announce that a field shouldn't be automatically dropped.

Actually this way exists in stable Rust, which is the type core::mem::ManuallyDrop<T>.

It would be great to talk about that in the Nomicon.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the "Destructors" chapter and read the existing note about a future first-class way to prevent automatic field drops. Use the linked core::mem::ManuallyDrop documentation as the reference, and consider the documentation complete when the chapter explains its stable availability and role.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.