Skip to content

GNU Hurd compilation failure: expected SystemTime, found timespec #123032

Closed
@newpavlov

Description

@newpavlov

Compiling project with cargo build -Z build-std=std --target=i686-unknown-hurd-gnu --features="std" causes the following compilation error:

error[E0308]: mismatched types
   --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:520:29
    |
520 |         Ok(SystemTime::from(self.stat.st_mtim))
    |            ---------------- ^^^^^^^^^^^^^^^^^ expected `SystemTime`, found `timespec`
    |            |
    |            arguments to this function are incorrect
    |
note: associated function defined here
   --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:585:8
    |
585 |     fn from(value: T) -> Self;
    |        ^^^^

error[E0308]: mismatched types
   --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/fs.rs:548:29
    |
548 |         Ok(SystemTime::from(self.stat.st_atim))
    |            ---------------- ^^^^^^^^^^^^^^^^^ expected `SystemTime`, found `timespec`
    |            |
    |            arguments to this function are incorrect
    |
note: associated function defined here
   --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/convert/mod.rs:585:8
    |
585 |     fn from(value: T) -> Self;
    |        ^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `std` (lib) due to 2 previous errors
Error: Process completed with exit code 101.

See this CI job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions