rust-lang / rust-lang/std-dev-guide
Document what we do about unwinding and leaks
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 90
- Forks
- 47
- Avg merge
- 9h 22m
- Merged PRs (30d)
- 1
Description
In https://github.com/rust-lang/rust/pull/67290 we added drop guards to collections that will attempt to continue dropping in case dropping an item unwinds. That means collections will either not leak if an item unwinds during drop, or will abort.
In https://github.com/rust-lang/rust/pull/75644 we've looked at preventing leaks if an unwind happens partway through initializing a MaybeUninit (usually for arrays).
We should come up with some concrete guidance on how we want to deal with leaks and unwinding
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading rust-lang/rust PRs 67290 and 75644, which cover drop guards for collections and leaks during partial MaybeUninit initialization. Use those examples to identify the concrete unwinding and leak guidance needed for standard library developers. Done means documenting an agreed approach, including when collections should continue dropping and when aborting is acceptable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100