rust-lang / rust-lang/rust

Missing safety blocks in solid/io.rs

Open
#135,904 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-cleanup T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Location
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.