Skip to content

failed to evaluate generic const expression #1

@peter-lyons-kehl

Description

@peter-lyons-kehl

rust-lang#107274 -> https://github.com/rust-lang/rust/actions/runs/3999992931/jobs/6864578721#step:26:778:

...
Compiling std_detect v0.1.5 (/checkout/library/stdarch/crates/std_detect)
error: failed to evaluate generic const expression
    --> /checkout/library/alloc/src/vec/mod.rs:2921:10
     |
2921 |     [(); core::alloc::co_alloc_metadata_num_slots_with_preference::<A>(COOP_PREFERRED)]:,
     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: the crate this constant originates from uses `#![feature(generic_const_exprs)]`
help: consider enabling this feature
    -->  |/cargo/registry/src/github.com-1ecc6299db9ec823/miniz_oxide-0.5.3/src/lib.rs:1:1
     |
1    | #![feature(generic_const_exprs)]
     |

I read this as "the consumer crate doesn't specify generic_const_exprs, but it should". Is this the right meaning?

If so, please shed more light. Because, consumer crates don't need to specify generic_const_exprs:

Please explain or share any tips.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions