Skip to content

bug: hashbrown v0.16.1 build failed with stale nightly toolchains #673

@MrCroxx

Description

@MrCroxx

Hi, I'm using hashbrown v0.16.1 with nightly-2025-02-20 and got this error when building:

error[E0405]: cannot find trait `TrivialClone` in module `core::clone`
    --> /home/mrcroxx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.16.1/src/raw/mod.rs:3423:22
     |
3423 | impl<T: core::clone::TrivialClone, A: Allocator + Clone> RawTableClone for RawTable<T, A> {
     |                      ^^^^^^^^^^^^ not found in `core::clone`

error[E0635]: unknown feature `trivial_clone`
  --> /home/mrcroxx/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/hashbrown-0.16.1/src/lib.rs:20:9
   |
20 |         trivial_clone,
   |         ^^^^^^^^^^^^^

    Checking rand v0.9.2
   Compiling fastrace-macro v0.7.15
Some errors have detailed explanations: E0405, E0635.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `hashbrown` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Script `cargo +nightly-2025-02-20 doc --features "nightly" --no-deps` failed.

IIUC, the trivial_clone feature was introduced on 2025-11-11 via rust-lang/rust#135634 . All nightly toolchain before that will broken with hashbrown v0.16.1.

Is this error expected?

If not, would crate rustversion be helpful here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions