Missing safety blocks in solid/io.rs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location
- Second impl block for
BorrowedFd<'_>, safety is in the first one: https://github.com/rust-lang/rust/blob/dee7d0e730a3a3ed98c89dd33c4ac16edc82de8a/library/std/src/os/solid/io.rs#L125-L126 - Near impl safety block of
OwnedFd: https://github.com/rust-lang/rust/blob/dee7d0e730a3a3ed98c89dd33c4ac16edc82de8a/library/std/src/os/solid/io.rs#L170-L171
Summary
This is my first issue so maybe there is no issue.
I'm checking some unsafe blocks just in case something is missing and there are those without safety blocks.
Since I saw a different file with a safety block in the drop function (see: https://github.com/rust-lang/rust/blob/dee7d0e730a3a3ed98c89dd33c4ac16edc82de8a/library/core/src/cell/lazy.rs#L150-L152) I thought it may be missing here.
What guide could I check to make sure?
Thanks in advance.
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
Inspect library/std/src/os/solid/io.rs at the second BorrowedFd impl and near the OwnedFd impl, using the linked lines as entry points. Compare the existing safety block in library/core/src/cell/lazy.rs, then determine from the project's guidance whether these unsafe blocks require corresponding safety documentation and verify both locations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100