about summary refs log tree commit diff
path: root/library/std/src/sys/fs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-04-05 10:18:04 +0200
committerGitHub <noreply@github.com>2025-04-05 10:18:04 +0200
commita64ccf4a46c80a975e197cb4610125838ca24cbf (patch)
treeb783dacf2f65227b4ab746a1817c6c77ead7fdd8 /library/std/src/sys/fs
parent56ffb43629bf58996c367073a0fa19e7d422df19 (diff)
parent3ab22fabf1a21077556c708633ceaefbb678c178 (diff)
Rollup merge of #139092 - thaliaarchi:move-fd-pal, r=joboet
Move `fd` into `std::sys`

Move platform definitions of `fd` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/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
Diffstat (limited to 'library/std/src/sys/fs')
-rw-r--r--library/std/src/sys/fs/hermit.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/fs/hermit.rs b/library/std/src/sys/fs/hermit.rs
index f83a2f90ed2..99690abe8ed 100644
--- a/library/std/src/sys/fs/hermit.rs
+++ b/library/std/src/sys/fs/hermit.rs
@@ -9,8 +9,8 @@ use crate::os::hermit::io::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, Raw
 use crate::path::{Path, PathBuf};
 use crate::sync::Arc;
 use crate::sys::common::small_c_string::run_path_with_cstr;
+use crate::sys::fd::FileDesc;
 pub use crate::sys::fs::common::{copy, exists};
-use crate::sys::pal::fd::FileDesc;
 use crate::sys::time::SystemTime;
 use crate::sys::{cvt, unsupported};
 use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};