Move `fd` into `std::sys` by thaliaarchi · Pull Request #139092 · rust-lang/rust

@rustbot rustbot added O-hermit

Operating System: Hermit

O-SGX

Target: SGX

O-unix

Operating system: Unix-like

O-wasi

Operating system: Wasi, Webassembly System Interface

S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Mar 29, 2025

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Mar 29, 2025

jhpratt added a commit to jhpratt/rust that referenced this pull request

Mar 30, 2025
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of rust-lang#117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 30, 2025
Rollup of 5 pull requests

Successful merges:

 - rust-lang#137836 (Set `target_vendor = "openwrt"` on `mips64-openwrt-linux-musl`)
 - rust-lang#138206 ([AIX] Ignore linting on repr(C) structs with repr(packed) or repr(align(n)))
 - rust-lang#139044 (bootstrap: Avoid cloning `change-id` list)
 - rust-lang#139092 (Move `fd` into `std::sys`)
 - rust-lang#139111 (Properly document FakeReads)

r? `@ghost`
`@rustbot` modify labels: rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 30, 2025
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of rust-lang#117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

@bors bors added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

and removed S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

labels

Mar 30, 2025

@thaliaarchi

@thaliaarchi

@rustbot rustbot added the T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

label

Apr 5, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 5, 2025
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of rust-lang#117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

try-job: x86_64-gnu-aux

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Apr 5, 2025

bors added a commit to rust-lang-ci/rust that referenced this pull request

Apr 5, 2025
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#138368 (KCFI: Add KCFI arity indicator support)
 - rust-lang#138381 (Implement `SliceIndex` for `ByteStr`)
 - rust-lang#139092 (Move `fd` into `std::sys`)
 - rust-lang#139398 (Change notifications for Exploit Mitigations PG)

r? `@ghost`
`@rustbot` modify labels: rollup

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Apr 5, 2025
Rollup merge of rust-lang#139092 - thaliaarchi:move-fd-pal, r=joboet

Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of rust-lang#117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

try-job: x86_64-gnu-aux

github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request

Apr 10, 2025
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of rust-lang#117276.

Unlike other modules directly under `std::sys`, this is only available on some platforms and I have not provided a fallback abstraction for unsupported platforms. That is similar to how `std::os::fd` is gated to only supported platforms.

Also, fix the `unsafe_op_in_unsafe_fn` lint, which was allowed for the Unix fd impl. Since macro expansions from `std::sys::pal::unix::weak` trigger this lint, fix it there too.

cc `@joboet,` `@ChrisDenton`

try-job: x86_64-gnu-aux