10000 Build fails with -Zbuild-std · Issue #771 · tower-rs/tower · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Build fails with -Zbuild-std #771
Closed
Closed
@asomers

Description

@asomers

Attempting to build tower for an architecture that isn't available via rustup, using -Zbuild-std, will fail. For example:

> cargo check -Zbuild-std --all-features --target aarch64-unknown-freebsd
    Checking tower v0.4.13 (/usr/home/somers/src/rust/tower/tower)
error[E0107]: struct takes 3 generic arguments but 2 generic arguments were supplied
  --> tower/src/ready_cache/cache.rs:65:25
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx>,
   |                         ^^^^^^^^ -  -------- supplied 2 generic arguments
   |                         |
   |                         expected 3 generic arguments
   |
note: struct defined here, with 3 generic parameters: `K`, `V`, `S`
  --> /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.3/src/map.rs:76:12
   |
76 | pub struct IndexMap<K, V, S> {
   |            ^^^^^^^^ -  -  -
help: add missing generic argument
   |
65 |     pending_cancel_txs: IndexMap<K, CancelTx, S>,
   |                                             +++

This is due to a bug in IndexMap, and it's already been fixed. It's already been reported in IndexMap, too. The solutions are either:

  • Upgrade to indexmap v2, or
  • Enable the std feature of indexmap

See also indexmap-rs/indexmap#289

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ready-cacheArea: The tower "ready_cache" middlewareC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0