[GH-ISSUE #774] Unable to compile: this struct takes 3 type arguments but only 2 type arguments were supplied #409

Closed
opened 2026-02-27 19:30:28 +03:00 by kerem · 4 comments
Owner

Originally created by @mathquis on GitHub (May 28, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/774

OS: Debian (buster)

error[E0107]: this struct takes 3 type arguments but only 2 type arguments were supplied
  --> core/src/cache.rs:18:12
   |
18 |     queue: PriorityQueue<PathBuf, Reverse<SystemTime>>,
   |            ^^^^^^^^^^^^^ -------  ------------------- supplied 2 type arguments
   |            |
   |            expected 3 type arguments
   |
note: struct defined here, with 3 type parameters: `I`, `P`, `H`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/priority-queue-1.1.1/src/pqueue.rs:62:12
   |
62 | pub struct PriorityQueue<I, P, H>
   |            ^^^^^^^^^^^^^ -  -  -
help: add missing type argument
   |
18 |     queue: PriorityQueue<PathBuf, Reverse<SystemTime>, H>,
   |                                                      ^^^

error: aborting due to previous error
Originally created by @mathquis on GitHub (May 28, 2021). Original GitHub issue: https://github.com/librespot-org/librespot/issues/774 OS: Debian (buster) ``` error[E0107]: this struct takes 3 type arguments but only 2 type arguments were supplied --> core/src/cache.rs:18:12 | 18 | queue: PriorityQueue<PathBuf, Reverse<SystemTime>>, | ^^^^^^^^^^^^^ ------- ------------------- supplied 2 type arguments | | | expected 3 type arguments | note: struct defined here, with 3 type parameters: `I`, `P`, `H` --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/priority-queue-1.1.1/src/pqueue.rs:62:12 | 62 | pub struct PriorityQueue<I, P, H> | ^^^^^^^^^^^^^ - - - help: add missing type argument | 18 | queue: PriorityQueue<PathBuf, Reverse<SystemTime>, H>, | ^^^ error: aborting due to previous error ```
kerem 2026-02-27 19:30:28 +03:00
Author
Owner

@roderickvd commented on GitHub (May 28, 2021):

What is your rustc version? Debian Buster has 1.41 I believe while the minimum supported version is 1.48.

<!-- gh-comment-id:850494265 --> @roderickvd commented on GitHub (May 28, 2021): What is your `rustc` version? Debian Buster has 1.41 I believe while the minimum supported version is 1.48.
Author
Owner

@mathquis commented on GitHub (May 28, 2021):

rustc 1.52.1 (9bc8c42bb 2021-05-09)
cargo 1.52.0 (69767412a 2021-04-21)

Installed with curl https://sh.rustup.rs -sSf | sh

<!-- gh-comment-id:850527020 --> @mathquis commented on GitHub (May 28, 2021): rustc 1.52.1 (9bc8c42bb 2021-05-09) cargo 1.52.0 (69767412a 2021-04-21) Installed with `curl https://sh.rustup.rs -sSf | sh`
Author
Owner

@kingosticks commented on GitHub (May 28, 2021):

isn't this something to do with not using std? That 3 argument version is gated by #[cfg(not(has_std))].

<!-- gh-comment-id:850528668 --> @kingosticks commented on GitHub (May 28, 2021): isn't this something to do with not using `std`? That 3 argument version is gated by `#[cfg(not(has_std))]`.
Author
Owner

@mathquis commented on GitHub (May 28, 2021):

@kingosticks You're right!

sudo apt install libstd-rust-dev solved it.

<!-- gh-comment-id:850536706 --> @mathquis commented on GitHub (May 28, 2021): @kingosticks You're right! `sudo apt install libstd-rust-dev` solved it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#409
No description provided.