Skip to content

pal::hermit::time::SystemTime is not compiling in libstd for Hermit ABI #150294

@notgull

Description

@notgull

I tried running these commands:

$ cargo new --bin herm-test
$ cd herm-test
$ cargo +nightly check -Z build-std --target x86_64-unknown-hermit

However, the build failed with the following error:

error[E0560]: struct `pal::hermit::time::SystemTime` has no field named `t`
   --> /home/jtnunley/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/hermit/time.rs:216:46
    |
211 | pub struct SystemTime(Timespec);
    |            ---------- `pal::hermit::time::SystemTime` defined here
...
216 |     pub const MAX: SystemTime = SystemTime { t: Timespec::MAX };
    |                                              ^ field does not exist
    |
help: `pal::hermit::time::SystemTime` is a tuple struct, use the appropriate syntax
    |
216 -     pub const MAX: SystemTime = SystemTime { t: Timespec::MAX };
216 +     pub const MAX: SystemTime = pal::hermit::time::SystemTime(/* Timespec */);
    |

error[E0560]: struct `pal::hermit::time::SystemTime` has no field named `t`
   --> /home/jtnunley/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/hermit/time.rs:218:46
    |
211 | pub struct SystemTime(Timespec);
    |            ---------- `pal::hermit::time::SystemTime` defined here
...
218 |     pub const MIN: SystemTime = SystemTime { t: Timespec::MIN };
    |                                              ^ field does not exist
    |
help: `pal::hermit::time::SystemTime` is a tuple struct, use the appropriate syntax
    |
218 -     pub const MIN: SystemTime = SystemTime { t: Timespec::MIN };
218 +     pub const MIN: SystemTime = pal::hermit::time::SystemTime(/* Timespec */);
    |

Meta

rustc --version --verbose:

rustc 1.94.0-nightly (806c2a35d 2025-12-19)
binary: rustc
commit-hash: 806c2a35dcc1db7867864fea0a7a65554a5238b7
commit-date: 2025-12-19
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions