Closed
Description
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