Skip to content

Compilation error with v0.10.2 and allow_multithreading feature #3

Closed

Description

@jbangelo

Description

There's a compilation error when building the latest release with the allow_multithreading feature enabled. The BinLayout::with_cpu_count function calls BinLayout::new which does not exist.

Reproduction Steps

Check out v0.10.2 and build with the allow_multithreading feature:

git checkout 0.10.2
cargo build --features allow_multithreading

And you should get the following error:

error[E0599]: no function or associated item named `new` found for struct `BinLayout<K>` in the current scope
  --> src/sort/parallel/bin_layout.rs:25:25
   |
25 |         Some(BinLayout::new(min_key, max_key, max_bins_count))
   |                         ^^^ function or associated item not found in `BinLayout<_>`
   |
  ::: src/sort/bin_layout.rs:9:1
   |
 9 | pub(crate) struct BinLayout<K> {
   | ------------------------------ function or associated item `new` not found for this struct
   |
note: if you're trying to build a new `BinLayout<_>` consider using one of the following associated functions:
      parallel::bin_layout::<impl BinLayout<K>>::with_cpu_count
      BinLayout::<K>::with_keys
  --> src/sort/parallel/bin_layout.rs:11:5
   |
11 | /     pub(super) fn with_cpu_count<T, F>(cpu: usize, slice: &[T], key: F) -> Option<Self>
12 | |     where
13 | |         T: Copy + Send + Sync,
14 | |         F: KeyFn<T, K> + Send + Sync,
   | |_____________________________________^
   |
  ::: src/sort/bin_layout.rs:71:5
   |
71 |       pub fn with_keys<T, F: KeyFn<T, K>>(array: &[T], key: F) -> Option<Self> {
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0599`.

Activity

  1. NailxSharipov commented on Apr 24, 2026

    @NailxSharipov
    Member

    Thanks for the early report and PR.

    I also added CI checks #6 to test both default and allow_multithreading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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