Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should cot_tutorial just work? #196

Closed
step21 opened this issue Feb 23, 2025 · 3 comments
Closed

Should cot_tutorial just work? #196

step21 opened this issue Feb 23, 2025 · 3 comments

Comments

@step21
Copy link

step21 commented Feb 23, 2025

Hey,

so I wanted to try out the tutorial, but it only seems to output a bunch of errors.
Rust version is 1.85
Seems to be about crate digest erroring out?


error[E0277]: the trait bound `<Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api.rs:43:52
   |
43 |     fn finalize_fixed_core(&mut self, buffer: &mut Buffer<Self>, out: &mut Output<Self>);
   |                                                    ^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<Self as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
43 |     fn finalize_fixed_core(&mut self, buffer: &mut Buffer<Self>, out: &mut Output<Self>) where <Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize;
   |                                                                                          +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api.rs:53:50
   |
53 |     fn finalize_xof_core(&mut self, buffer: &mut Buffer<Self>) -> Self::ReaderCore;
   |                                                  ^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<Self as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
53 |     fn finalize_xof_core(&mut self, buffer: &mut Buffer<Self>) -> Self::ReaderCore where <Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize;
   |                                                                                    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api.rs:93:55
   |
93 |     fn finalize_variable_core(&mut self, buffer: &mut Buffer<Self>, out: &mut Output<Self>);
   |                                                       ^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<Self as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
93 |     fn finalize_variable_core(&mut self, buffer: &mut Buffer<Self>, out: &mut Output<Self>) where <Self as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize;
   |                                                                                             +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/ct_variable.rs:105:22
    |
105 |         buffer: &mut Buffer<Self>,
    |                      ^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
107 |     ) where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |       ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:26:13
   |
26 |     buffer: BlockBuffer<T::BlockSize, T::BufferKind>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
24 | pub struct RtVariableCoreWrapper<T: VariableOutputCore> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                                         ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:33:13
   |
33 |     buffer: BlockBuffer<T::BlockSize, T::BufferKind>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
   |
31 | pub struct CoreWrapper<T: BufferKindUser> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                           ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:124:19
    |
124 |     type Reader = XofReaderCoreWrapper<T::ReaderCore>;
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
    |
10  | pub struct XofReaderCoreWrapper<T>
    |            ^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `ExtendableOutput::Reader`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/lib.rs:143:5
    |
143 |     type Reader: XofReader;
    |     ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `ExtendableOutput::Reader`
help: consider further restricting the associated type
    |
123 | impl<T: ExtendableOutputCore> ExtendableOutput for CoreWrapper<T> where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                                   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
help: consider relaxing the implicit `Sized` restriction
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/lib.rs:143:27
    |
143 |     type Reader: XofReader + ?Sized;
    |                            ++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:15:24
   |
15 |     pub(super) buffer: ReadBuffer<T::BlockSize>,
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `ReadBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:27
   |
8  | pub struct ReadBuffer<BS: ArraySize> {
   |                           ^^^^^^^^^ required by this bound in `ReadBuffer`
help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
   |
12 |     T: XofReaderCore, <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize
   |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<T>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:9:10
    |
9   | #[derive(Clone, Default)]
    |          ^^^^^ within `XofReaderCoreWrapper<T>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `XofReaderCoreWrapper<T>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
    |
10  | pub struct XofReaderCoreWrapper<T>
    |            ^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Clone`
   --> /Users/user/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/clone.rs:149:18
    |
149 | pub trait Clone: Sized {
    |                  ^^^^^ required by this bound in `Clone`
    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<T>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:9:17
    |
9   | #[derive(Clone, Default)]
    |                 ^^^^^^^ within `XofReaderCoreWrapper<T>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `XofReaderCoreWrapper<T>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
    |
10  | pub struct XofReaderCoreWrapper<T>
    |            ^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `Default`
   --> /Users/user/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/default.rs:107:20
    |
107 | pub trait Default: Sized {
    |                    ^^^^^ required by this bound in `Default`
    = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/ct_variable.rs:109:20
    |
109 |         self.inner.finalize_variable_core(buffer, &mut full_res);
    |                    ^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
107 |     ) where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |       ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:26:5
   |
23 | #[derive(Clone)]
   |          ----- in this derive macro expansion
...
26 |     buffer: BlockBuffer<T::BlockSize, T::BufferKind>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:43:14
   |
43 |         core.finalize_variable_core(buffer, &mut full_res);
   |              ^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
32 |     fn finalize_dirty(&mut self, out: &mut [u8]) -> Result<(), InvalidBufferSize> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                                                                   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `reset` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:66:21
   |
66 |         self.buffer.reset();
   |                     ^^^^^ method cannot be called due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `reset`, perhaps you need to implement one of them:
           candidate #1: `Digest`
           candidate #2: `DynDigest`
           candidate #3: `Mac`

error[E0599]: the method `digest_blocks` exists for mutable reference `&mut BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:75:16
   |
75 |         buffer.digest_blocks(input, |blocks| core.update_blocks(blocks));
   |                ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:88:13
   |
88 |             buffer,
   |             ^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
83 |     fn new(output_size: usize) -> Result<Self, InvalidOutputSize> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                                                   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:85:22
   |
85 |         let buffer = Default::default();
   |                      ^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
   = note: required for `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>` to implement `Default`
help: consider further restricting the associated type
   |
83 |     fn new(output_size: usize) -> Result<Self, InvalidOutputSize> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                                                   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

   Compiling nom v7.1.3
error[E0599]: the method `reset` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:109:21
    |
109 |         self.buffer.reset();
    |                     ^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `reset`, perhaps you need to implement one of them:
            candidate #1: `Digest`
            candidate #2: `DynDigest`
            candidate #3: `Mac`

error[E0599]: the method `get_pos` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:160:49
    |
160 |         let serialized_pos = Array([self.buffer.get_pos().try_into().unwrap()]);
    |                                                 ^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`

error[E0599]: the method `clone` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:161:43
    |
161 |         let serialized_data = self.buffer.clone().pad_with_zeros();
    |                                           ^^^^^ method cannot be called due to unsatisfied trait bounds
    |
   ::: /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:1
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    | ---------------------------------------------------- doesn't satisfy `_: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
            which is required by `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>: Clone`

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:181:21
    |
181 |               buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |  _____________________^
182 | |                 .map_err(|_| DeserializeStateError)?,
    | |____________________________________________________^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
172 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:181:21
    |
181 |             buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer::<BS, K>::try_new`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:140:10
    |
140 | impl<BS: ArraySize, K: BufferKind> BlockBuffer<BS, K> {
    |          ^^^^^^^^^ required by this bound in `BlockBuffer::<BS, K>::try_new`
...
154 |     pub fn try_new(buf: &[u8]) -> Result<Self, Error> {
    |            ------- required by a bound in this associated function
help: consider further restricting the associated type
    |
172 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/rt_variable.rs:181:21
    |
181 |             buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |                     ^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
172 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:33:5
   |
30 | #[derive(Clone, Default)]
   |          ----- in this derive macro expansion
...
33 |     buffer: BlockBuffer<T::BlockSize, T::BufferKind>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:33:5
   |
30 | #[derive(Clone, Default)]
   |                 ------- in this derive macro expansion
...
33 |     buffer: BlockBuffer<T::BlockSize, T::BufferKind>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:51:22
   |
51 |         Self { core, buffer }
   |                      ^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
49 |     pub fn from_core(core: T) -> Self where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                       ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:50:22
   |
50 |         let buffer = Default::default();
   |                      ^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
   = note: required for `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>` to implement `Default`
help: consider further restricting the associated type
   |
49 |     pub fn from_core(core: T) -> Self where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                       ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:64:21
   |
64 |             buffer: Default::default(),
   |                     ^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
61 |     fn new(key: &Key<Self>) -> Self where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:72:21
   |
72 |             buffer: Default::default(),
   |                     ^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `BlockBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
   |
92 | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
   |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
   |
69 |     fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
   |                                                                  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `reset` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:89:21
   |
89 |         self.buffer.reset();
   |                     ^^^^^ method cannot be called due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `reset`, perhaps you need to implement one of them:
           candidate #1: `Digest`
           candidate #2: `DynDigest`
           candidate #3: `Mac`

error[E0599]: the method `digest_blocks` exists for mutable reference `&mut BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:97:16
   |
97 |         buffer.digest_blocks(input, |blocks| core.update_blocks(blocks));
   |                ^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:109:14
    |
109 |         core.finalize_fixed_core(buffer, out);
    |              ^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
107 |     fn finalize_into(mut self, out: &mut Output<Self>) where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                        ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:117:14
    |
117 |         core.finalize_fixed_core(buffer, out);
    |              ^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
115 |     fn finalize_into_reset(&mut self, out: &mut Output<Self>) where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `reset` exists for mutable reference `&mut BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:119:16
    |
119 |         buffer.reset();
    |                ^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `reset`, perhaps you need to implement one of them:
            candidate #1: `Digest`
            candidate #2: `DynDigest`
            candidate #3: `Mac`

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:127:34
    |
127 |     fn finalize_xof(mut self) -> Self::Reader {
    |                                  ^^^^^^^^^^^^ within `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
    |
10  | pub struct XofReaderCoreWrapper<T>
    |            ^^^^^^^^^^^^^^^^^^^^
    = note: the return type of a function must have a statically known size
help: consider further restricting the associated type
    |
127 |     fn finalize_xof(mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:129:29
    |
129 |             core: self.core.finalize_xof_core(&mut self.buffer),
    |                             ^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
127 |     fn finalize_xof(mut self) -> Self::Reader where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:130:21
    |
130 |             buffer: Default::default(),
    |                     ^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `ReadBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:27
    |
8   | pub struct ReadBuffer<BS: ArraySize> {
    |                           ^^^^^^^^^ required by this bound in `ReadBuffer`
help: consider further restricting the associated type
    |
127 |     fn finalize_xof(mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                               ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:137:41
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader {
    |                                         ^^^^^^^^^^^^ within `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `XofReaderCoreWrapper<<T as ExtendableOutputCore>::ReaderCore>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
    |
10  | pub struct XofReaderCoreWrapper<T>
    |            ^^^^^^^^^^^^^^^^^^^^
    = note: the return type of a function must have a statically known size
help: consider further restricting the associated type
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:139:32
    |
139 |         let reader_core = core.finalize_xof_core(buffer);
    |                                ^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `reset` exists for mutable reference `&mut BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:141:16
    |
141 |         buffer.reset();
    |                ^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following traits define an item `reset`, perhaps you need to implement one of them:
            candidate #1: `Digest`
            candidate #2: `DynDigest`
            candidate #3: `Mac`

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:145:13
    |
145 |             buffer,
    |             ^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `ReadBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:27
    |
8   | pub struct ReadBuffer<BS: ArraySize> {
    |                           ^^^^^^^^^ required by this bound in `ReadBuffer`
help: consider further restricting the associated type
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:142:13
    |
142 |         let buffer = Default::default();
    |             ^^^^^^ within `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:12
    |
8   | pub struct ReadBuffer<BS: ArraySize> {
    |            ^^^^^^^^^^
    = note: all local variables must have a statically known size
    = help: unsized locals are gated as an unstable feature
help: consider further restricting the associated type
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:142:22
    |
142 |         let buffer = Default::default();
    |                      ^^^^^^^^^^^^^^^^^^ within `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize`
    |
note: required because it appears within the type `ReadBuffer<<<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize>`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:12
    |
8   | pub struct ReadBuffer<BS: ArraySize> {
    |            ^^^^^^^^^^
note: required by a bound in `default`
   --> /Users/user/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/default.rs:107:20
    |
107 | pub trait Default: Sized {
    |                    ^^^^^ required by this bound in `Default::default`
...
139 |     fn default() -> Self;
    |        ------- required by a bound in this associated function
help: consider further restricting the associated type
    |
137 |     fn finalize_xof_reset(&mut self) -> Self::Reader where <<T as ExtendableOutputCore>::ReaderCore as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                                      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0599]: the method `get_pos` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:200:49
    |
200 |         let serialized_pos = Array([self.buffer.get_pos().try_into().unwrap()]);
    |                                                 ^^^^^^^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`

error[E0599]: the method `clone` exists for struct `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:201:43
    |
201 |         let serialized_data = self.buffer.clone().pad_with_zeros();
    |                                           ^^^^^ method cannot be called due to unsatisfied trait bounds
    |
   ::: /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:1
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    | ---------------------------------------------------- doesn't satisfy `_: Clone`
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
            which is required by `BlockBuffer<<T as BlockSizeUser>::BlockSize, <T as BufferKindUser>::BufferKind>: Clone`

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:217:21
    |
217 |               buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |  _____________________^
218 | |                 .map_err(|_| DeserializeStateError)?,
    | |____________________________________________________^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
210 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:217:21
    |
217 |             buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer::<BS, K>::try_new`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:140:10
    |
140 | impl<BS: ArraySize, K: BufferKind> BlockBuffer<BS, K> {
    |          ^^^^^^^^^ required by this bound in `BlockBuffer::<BS, K>::try_new`
...
154 |     pub fn try_new(buf: &[u8]) -> Result<Self, Error> {
    |            ------- required by a bound in this associated function
help: consider further restricting the associated type
    |
210 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/wrapper.rs:217:21
    |
217 |             buffer: BlockBuffer::try_new(&serialized_data[..serialized_pos[0].into()])
    |                     ^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
    |
note: required by a bound in `BlockBuffer`
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/lib.rs:92:28
    |
92  | pub struct BlockBuffer<BS: ArraySize, K: BufferKind> {
    |                            ^^^^^^^^^ required by this bound in `BlockBuffer`
help: consider further restricting the associated type
    |
210 |     ) -> Result<Self, DeserializeStateError> where <T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize {
    |                                              ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<T>`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:9:10
   |
9  | #[derive(Clone, Default)]
   |          ^^^^^ within `XofReaderCoreWrapper<T>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required because it appears within the type `XofReaderCoreWrapper<T>`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
   |
10 | pub struct XofReaderCoreWrapper<T>
   |            ^^^^^^^^^^^^^^^^^^^^
   = note: the return type of a function must have a statically known size
   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:15:5
   |
9  | #[derive(Clone, Default)]
   |          ----- in this derive macro expansion
...
15 |     pub(super) buffer: ReadBuffer<T::BlockSize>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `ReadBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:27
   |
8  | pub struct ReadBuffer<BS: ArraySize> {
   |                           ^^^^^^^^^ required by this bound in `ReadBuffer`
   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied in `XofReaderCoreWrapper<T>`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:9:17
   |
9  | #[derive(Clone, Default)]
   |                 ^^^^^^^ within `XofReaderCoreWrapper<T>`, the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required because it appears within the type `XofReaderCoreWrapper<T>`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:10:12
   |
10 | pub struct XofReaderCoreWrapper<T>
   |            ^^^^^^^^^^^^^^^^^^^^
   = note: the return type of a function must have a statically known size
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize` is not satisfied
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:15:5
   |
9  | #[derive(Clone, Default)]
   |                 ------- in this derive macro expansion
...
15 |     pub(super) buffer: ReadBuffer<T::BlockSize>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `block_buffer::hybrid_array::ArraySize` is not implemented for `<T as BlockSizeUser>::BlockSize`
   |
note: required by a bound in `ReadBuffer`
  --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/block-buffer-0.11.0-rc.4/src/read.rs:8:27
   |
8  | pub struct ReadBuffer<BS: ArraySize> {
   |                           ^^^^^^^^^ required by this bound in `ReadBuffer`
   = note: this error originates in the derive macro `Default` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `read` exists for mutable reference `&mut ReadBuffer<<T as BlockSizeUser>::BlockSize>`, but its trait bounds were not satisfied
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/core_api/xof_reader.rs:35:13
    |
35  |         buf.read(buffer, |block| *block = core.read_block());
    |             ^^^^ method cannot be called on `&mut ReadBuffer<<T as BlockSizeUser>::BlockSize>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<T as BlockSizeUser>::BlockSize: block_buffer::hybrid_array::ArraySize`
    = help: items from traits can only be used if the trait is implemented and in scope
note: `XofReader` defines an item `read`, perhaps you need to implement it
   --> /Users/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/digest-0.11.0-pre.9/src/lib.rs:122:1
    |
122 | pub trait XofReader {
    | ^^^^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `digest` (lib) due to 53 previous errors

@trkelly23
Copy link

trkelly23 commented Feb 23, 2025

I just ran into this same issue which I found out had been reported in
#187
and is fixed by pulling specific version of dependent crates
cargo update 'block-buffer@0.11.0-rc.4' --precise '0.11.0-rc.3'

@m4tx
Copy link
Member

m4tx commented Feb 23, 2025

Yes, you can use the command mentioned by @trkelly23 to work around this issue.

We just released cot-cli v0.1.2 which should fix the issue with new projects as well!

@step21
Copy link
Author

step21 commented Feb 23, 2025

Ah thanks. I did look at other issues but didn't see that one. Thanks for the help.

@step21 step21 closed this as completed Feb 23, 2025
pk5ls20 added a commit to LagrangeDev/mania that referenced this issue Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants