Skip to content

build error: type annotations needed #682

Open
@donpdonp

Description

@donpdonp

I'm trying to install uiua with cargo install uiua on rust 1.85.0 and get the following error

   Compiling hound v3.5.1
   Compiling uiua v0.14.1
error[E0283]: type annotations needed
  --> /home/donp/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/uiua-0.14.1/src/algorithm/dyadic/combine.rs:16:30
   |
16 |     if index >= shape.iter().product() {
   |              --              ^^^^^^^ cannot infer type of the type parameter `P` declared on the method `product`
   |              |
   |              type must be known at this point
   |
   = note: multiple `impl`s satisfying `usize: PartialOrd<_>` found in the following crates: `core`, `deranged`:
           - impl PartialOrd for usize;
           - impl<MIN, MAX> PartialOrd<deranged::RangedUsize<MIN, MAX>> for usize
             where the constant `MIN` has type `usize`, the constant `MAX` has type `usize`;
help: consider specifying the generic argument
   |
16 |     if index >= shape.iter().product::<P>() {
   |                                     +++++

For more information about this error, try `rustc --explain E0283`.
error: could not compile `uiua` (lib) due to 1 previous error
error: failed to compile `uiua v0.14.1`, intermediate artifacts can be found at `/tmp/cargo-installffco5K`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

donp@carbon desktop $ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)

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