Document what a "dangling pointer" is
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
There are several places this applies, e.g.:
std::ptr::danglingstd::ptr::from_ref(in the examples)dangling_pointers_from_temporarieslint
Summary
We have several place in the standard library or as part of lints where we use the term "dangling pointer" without defining it anywhere.
We should have a place where we define what that is, ideally in the standard library, in it's own section, maybe under std::ptr, so it can be referenced elsewhere.
It should probably have a definition, followed by some bad examples (and maybe how to fix them).
Wikipedia has article on the subject, I don't know if it could serve as a base for our documentation but it may be worth checking it.
Steps
- Add std documentation
- Update existing std docs
- Update lints diagnostics
Contributor guide
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 with the linked std::ptr::dangling and std::ptr::from_ref documentation, then inspect the dangling_pointers_from_temporaries lint. Define “dangling pointer” in a reusable standard-library section with bad examples and possible fixes, and update the existing std docs and lint diagnostics listed in the issue.
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
- 45/100