rust-lang / rust-lang/rust-clippy
invalid_null_ptr_usage lacks explanation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
Why is this bad?
This causes undefined behavior.
I'm still left with no idea why. The entire point of using pointers instead of references is to be able to use things like null and not worry about lifetimes so why is there so much ceremony to express a null slice pointer?
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 by reading the invalid_null_ptr_usage lint and its current explanation. Determine what rationale is missing about null slice pointers, references, lifetimes, and undefined behavior, then update the explanation so it directly addresses the reporter's question. Verify that the lint's documentation or explanation now makes the safety concern understandable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100