Closed
Description
I tried this code:
use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
With --target x86_64-unknown-hermit
.
I expected to see this happen: code to compile
Instead, this happened: failed to compile with
error[E0432]: unresolved import `std::os::fd`
--> src/net/udp.rs:12:14
|
12 | use std::os::fd::{AsFd, AsRawFd, BorrowedFd, FromRawFd, IntoRawFd, RawFd};
| ^^ could not find `fd` in `os`
Looking at the relevant code:
rust/library/std/src/os/mod.rs
Lines 163 to 164 in 212841e
It seems hermit
is imply missed from the cfg
. Inside of the fd
module there is already code for hermit:
rust/library/std/src/os/fd/raw.rs
Lines 18 to 29 in 212841e
I think this is just an oversight, but I since I don't develop for Hermit I'm not sure. (I hit this while updating Mio)
/cc @stlankes
Meta
rustc --version --verbose
:
rustc 1.81.0-nightly (f21554f7f 2024-06-08)
binary: rustc
commit-hash: f21554f7f0ff447b803961c51acafde04553c1ed
commit-date: 2024-06-08
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 18.1.7