rust-lang / rust-lang/libs-team
Help wanted: what to do with UnwindSafe and RefUnwindSafe
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 178
- Forks
- 28
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
It has been suggested many times that UnwindSafe and RefUnwindSafe are more often an annoyance than they are useful, and that it might be time to effectively disable/remove them.
Doing so requires some research and the design of a backwards compatible deprecation path.
To do:
- Find out how often these traits are used in a meaningful way (and how much correctness depends on it), vs how often people just ignore these traits using
AssertUnwindSafe - Look through all open and past issues about these traits: https://github.com/rust-lang/rust/issues?q=in%3Atitle+UnwindSafe
- See how often these traits are implemented incorrectly
- Including in the standard library
- How often that is deliberate vs by accident
- Write up a summary of all the research above
- Decide whether it's worth changing anything
- Make a plan for deprecating/removing them in a backwards compatible way
(E.g. by implementing them for all types and marking them as#[deprecated],
or by removing theUnwindSafebound fromcatch_unwind, or something else.) - Maybe implement it for a crater run, to gather more confidence the plan will work.
- Post the plan as an RFC.
- Discuss RFC and get it approved.
- Implement it.
- Ship it.
Or, if it turns out to be a bad idea to deprecate these traits:
- Find out what users find confusing about these traits.
- Improve the documentation to fix that.
- Maybe: work out a plan to rename the traits, to avoid the word 'unsafe'.
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 reviewing the linked open and past Rust issues about UnwindSafe, then compare GitHub code-search results with responses from the linked Twitter and Mastodon posts. Record meaningful uses, AssertUnwindSafe workarounds, and implementation concerns in a research summary. Done means a backwards-compatible deprecation or documentation plan is written for an RFC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100