Closed
Description
error[E0277]: the trait bound `u64: core::slice::SliceIndex<[HistogramType]>` is not satisfied
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:271:26
|
271 | let data_size: usize = histograms[0].slice().len();
| ^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `core::slice::SliceIndex<[HistogramType]>` is not implemented for `u64`
= note: required because of the requirements on the impl of `core::ops::Index<u64>` for `[HistogramType]`
error[E0277]: the trait bound `u64: core::slice::SliceIndex<[f32]>` is not satisfied
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:341:13
|
341 | (*cost_iter).0[sub_index] += local_insert_cost[sub_index];
| ^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `core::slice::SliceIndex<[f32]>` is not implemented for `u64`
= note: required because of the requirements on the impl of `core::ops::Index<u64>` for `[f32]`
error[E0277]: the trait bound `u64: core::slice::SliceIndex<[f32]>` is not satisfied
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:341:42
|
341 | (*cost_iter).0[sub_index] += local_insert_cost[sub_index];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `core::slice::SliceIndex<[f32]>` is not implemented for `u64`
= note: required because of the requirements on the impl of `core::ops::Index<u64>` for `[f32]`
error[E0277]: the trait bound `u64: core::slice::SliceIndex<[f32]>` is not satisfied
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:342:30
|
342 | let final_cost = (*cost_iter).0[sub_index];
| ^^^^^^^^^^^^^^^^^^^^^^^^^ slice indices are of type `usize` or ranges of `usize`
|
= help: the trait `core::slice::SliceIndex<[f32]>` is not implemented for `u64`
= note: required because of the requirements on the impl of `core::ops::Index<u64>` for `[f32]`
error[E0308]: mismatched types
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:345:45
|
345 | *block_id_ptr = (base_index + sub_index) as u8;
| ^^^^^^^^^ expected usize, found u64
error[E0277]: cannot add `u64` to `usize`
--> /Users/nox/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-1.1.2/src/enc/block_splitter.rs:345:43
|
345 | *block_id_ptr = (base_index + sub_index) as u8;
| ^ no implementation for `usize + u64`
|
= help: the trait `core::ops::Add<u64>` is not implemented for `usize`
Cc @rust-lang/compiler