Skip to content

Add annotations to ensure that readers are Sync. #81

Add annotations to ensure that readers are Sync.

Add annotations to ensure that readers are Sync. #81

GitHub Actions / clippy failed Jan 6, 2025 in 0s

clippy

10 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 10
Warning 0
Note 0
Help 0

Versions

  • rustc 1.80.0 (051478957 2024-07-21)
  • cargo 1.80.0 (376290515 2024-07-16)
  • clippy 0.1.80 (0514789 2024-07-21)

Annotations

Check failure on line 1405 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1405:18
     |
1405 |     takes_sync::<MergeIterator<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `MergeIterator<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
     = note: required for `std::ptr::Unique<ShardIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `min_max_heap::MinMaxHeap<ShardIter<'static, usize, DefaultSort>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/min-max-heap-1.3.0/src/lib.rs:47:12
     |
47   | pub struct MinMaxHeap<T>(Vec<T>);
     |            ^^^^^^^^^^
note: required because it appears within the type `RangeIter<'static, usize, DefaultSort>`
    --> src/lib.rs:1006:12
     |
1006 | pub struct RangeIter<'a, T, S>
     |            ^^^^^^^^^
     = note: required for `std::ptr::Unique<RangeIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<RangeIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<RangeIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `MergeIterator<'static, usize, DefaultSort>`
    --> src/lib.rs:1188:12
     |
1188 | pub struct MergeIterator<'a, T: 'a, S: 'a>
     |            ^^^^^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 1404 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1404:18
     |
1404 |     takes_sync::<ShardIter<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `ShardIter<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 1403 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1403:18
     |
1403 |     takes_sync::<RangeIter<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `RangeIter<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
     = note: required for `std::ptr::Unique<ShardIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `min_max_heap::MinMaxHeap<ShardIter<'static, usize, DefaultSort>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/min-max-heap-1.3.0/src/lib.rs:47:12
     |
47   | pub struct MinMaxHeap<T>(Vec<T>);
     |            ^^^^^^^^^^
note: required because it appears within the type `RangeIter<'static, usize, DefaultSort>`
    --> src/lib.rs:1006:12
     |
1006 | pub struct RangeIter<'a, T, S>
     |            ^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 345 in src/unsorted.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
   --> src/unsorted.rs:345:18
    |
345 |     takes_sync::<UnsortedShardReader<usize, DefaultSort>>();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
    |
    = help: within `unsorted::UnsortedShardReader<usize>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `unsorted::UnsortedShardReader<usize>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
    |
48  | pub struct LZ4FDecompressionContext(pub *mut c_void);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
    |
9   | struct DecoderContext {
    |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<std::fs::File, std::fs::File>>>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
    |
14  | pub struct Decoder<R> {
    |            ^^^^^^^
note: required because it appears within the type `unsorted::UnsortedShardIter<usize>`
   --> src/unsorted.rs:267:8
    |
267 | struct UnsortedShardIter<T> {
    |        ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardIter<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardFileReader<usize>`
   --> src/unsorted.rs:167:8
    |
167 | struct UnsortedShardFileReader<T, S = DefaultSort>
    |        ^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardFileReader<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardReader<usize>`
   --> src/unsorted.rs:30:12
    |
30  | pub struct UnsortedShardReader<T, S = DefaultSort>
    |            ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `unsorted::assert_readers_are_sync::takes_sync`
   --> src/unsorted.rs:343:28
    |
343 |     const fn takes_sync<T: Sync>() {}
    |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 344 in src/unsorted.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
   --> src/unsorted.rs:344:18
    |
344 |     takes_sync::<UnsortedShardFileReader<usize, DefaultSort>>();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
    |
    = help: within `unsorted::UnsortedShardFileReader<usize>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `unsorted::UnsortedShardFileReader<usize>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
    |
48  | pub struct LZ4FDecompressionContext(pub *mut c_void);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
    |
9   | struct DecoderContext {
    |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<std::fs::File, std::fs::File>>>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
    |
14  | pub struct Decoder<R> {
    |            ^^^^^^^
note: required because it appears within the type `unsorted::UnsortedShardIter<usize>`
   --> src/unsorted.rs:267:8
    |
267 | struct UnsortedShardIter<T> {
    |        ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardIter<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardFileReader<usize>`
   --> src/unsorted.rs:167:8
    |
167 | struct UnsortedShardFileReader<T, S = DefaultSort>
    |        ^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `unsorted::assert_readers_are_sync::takes_sync`
   --> src/unsorted.rs:343:28
    |
343 |     const fn takes_sync<T: Sync>() {}
    |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 1405 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1405:18
     |
1405 |     takes_sync::<MergeIterator<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `MergeIterator<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
     = note: required for `std::ptr::Unique<ShardIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `min_max_heap::MinMaxHeap<ShardIter<'static, usize, DefaultSort>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/min-max-heap-1.3.0/src/lib.rs:47:12
     |
47   | pub struct MinMaxHeap<T>(Vec<T>);
     |            ^^^^^^^^^^
note: required because it appears within the type `RangeIter<'static, usize, DefaultSort>`
    --> src/lib.rs:1006:12
     |
1006 | pub struct RangeIter<'a, T, S>
     |            ^^^^^^^^^
     = note: required for `std::ptr::Unique<RangeIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<RangeIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<RangeIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `MergeIterator<'static, usize, DefaultSort>`
    --> src/lib.rs:1188:12
     |
1188 | pub struct MergeIterator<'a, T: 'a, S: 'a>
     |            ^^^^^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 1404 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1404:18
     |
1404 |     takes_sync::<ShardIter<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `ShardIter<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 1403 in src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
    --> src/lib.rs:1403:18
     |
1403 |     takes_sync::<RangeIter<'static, usize, DefaultSort>>();
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
     |
     = help: within `ShardIter<'static, usize, DefaultSort>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `RangeIter<'static, usize, DefaultSort>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
     |
48   | pub struct LZ4FDecompressionContext(pub *mut c_void);
     |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
     |
9    | struct DecoderContext {
     |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<&'static std::fs::File, std::fs::File>>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
     |
14   | pub struct Decoder<R> {
     |            ^^^^^^^
note: required because it appears within the type `ShardIter<'static, usize, DefaultSort>`
    --> src/lib.rs:905:8
     |
905  | struct ShardIter<'a, T, S>
     |        ^^^^^^^^^
     = note: required for `std::ptr::Unique<ShardIter<'static, usize, DefaultSort>>` to implement `std::marker::Sync`
note: required because it appears within the type `alloc::raw_vec::RawVec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/raw_vec.rs:69:19
note: required because it appears within the type `std::vec::Vec<ShardIter<'static, usize, DefaultSort>>`
    --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/alloc/src/vec/mod.rs:398:12
note: required because it appears within the type `min_max_heap::MinMaxHeap<ShardIter<'static, usize, DefaultSort>>`
    --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/min-max-heap-1.3.0/src/lib.rs:47:12
     |
47   | pub struct MinMaxHeap<T>(Vec<T>);
     |            ^^^^^^^^^^
note: required because it appears within the type `RangeIter<'static, usize, DefaultSort>`
    --> src/lib.rs:1006:12
     |
1006 | pub struct RangeIter<'a, T, S>
     |            ^^^^^^^^^
note: required by a bound in `assert_readers_are_sync::takes_sync`
    --> src/lib.rs:1401:28
     |
1401 |     const fn takes_sync<T: Sync>() {}
     |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 345 in src/unsorted.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
   --> src/unsorted.rs:345:18
    |
345 |     takes_sync::<UnsortedShardReader<usize, DefaultSort>>();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
    |
    = help: within `unsorted::UnsortedShardReader<usize>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `unsorted::UnsortedShardReader<usize>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
    |
48  | pub struct LZ4FDecompressionContext(pub *mut c_void);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
    |
9   | struct DecoderContext {
    |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<std::fs::File, std::fs::File>>>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
    |
14  | pub struct Decoder<R> {
    |            ^^^^^^^
note: required because it appears within the type `unsorted::UnsortedShardIter<usize>`
   --> src/unsorted.rs:267:8
    |
267 | struct UnsortedShardIter<T> {
    |        ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardIter<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardFileReader<usize>`
   --> src/unsorted.rs:167:8
    |
167 | struct UnsortedShardFileReader<T, S = DefaultSort>
    |        ^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardFileReader<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardReader<usize>`
   --> src/unsorted.rs:30:12
    |
30  | pub struct UnsortedShardReader<T, S = DefaultSort>
    |            ^^^^^^^^^^^^^^^^^^^
note: required by a bound in `unsorted::assert_readers_are_sync::takes_sync`
   --> src/unsorted.rs:343:28
    |
343 |     const fn takes_sync<T: Sync>() {}
    |                            ^^^^ required by this bound in `takes_sync`

Check failure on line 344 in src/unsorted.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

`*mut std::ffi::c_void` cannot be shared between threads safely

error[E0277]: `*mut std::ffi::c_void` cannot be shared between threads safely
   --> src/unsorted.rs:344:18
    |
344 |     takes_sync::<UnsortedShardFileReader<usize, DefaultSort>>();
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*mut std::ffi::c_void` cannot be shared between threads safely
    |
    = help: within `unsorted::UnsortedShardFileReader<usize>`, the trait `std::marker::Sync` is not implemented for `*mut std::ffi::c_void`, which is required by `unsorted::UnsortedShardFileReader<usize>: std::marker::Sync`
note: required because it appears within the type `lz4::liblz4::LZ4FDecompressionContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-sys-1.11.1+lz4-1.10.0/src/lib.rs:48:12
    |
48  | pub struct LZ4FDecompressionContext(pub *mut c_void);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::decoder::DecoderContext`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:9:8
    |
9   | struct DecoderContext {
    |        ^^^^^^^^^^^^^^
note: required because it appears within the type `lz4::Decoder<std::io::BufReader<ReadAdapter<std::fs::File, std::fs::File>>>`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lz4-1.28.0/src/decoder.rs:14:12
    |
14  | pub struct Decoder<R> {
    |            ^^^^^^^
note: required because it appears within the type `unsorted::UnsortedShardIter<usize>`
   --> src/unsorted.rs:267:8
    |
267 | struct UnsortedShardIter<T> {
    |        ^^^^^^^^^^^^^^^^^
note: required because it appears within the type `std::option::Option<unsorted::UnsortedShardIter<usize>>`
   --> /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library/core/src/option.rs:574:10
note: required because it appears within the type `unsorted::UnsortedShardFileReader<usize>`
   --> src/unsorted.rs:167:8
    |
167 | struct UnsortedShardFileReader<T, S = DefaultSort>
    |        ^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `unsorted::assert_readers_are_sync::takes_sync`
   --> src/unsorted.rs:343:28
    |
343 |     const fn takes_sync<T: Sync>() {}
    |                            ^^^^ required by this bound in `takes_sync`